In Korean grammar, you use -(으)러 to express the purpose of you going somewhere. Therefore, the second clause of the sentence always has a verb of movement.
Expressing the purpose of your actions is easy with the form -(으)려고. However, keep in mind that this form does come with a few restrictions.
위해서, shortened as 위해, has the same function as -(으)려고 as it indicates the goal or purpose of an action. Though, it does not have the latter’s limitations.