To increase motivation, first develop a reasonable goal and a plan to achieve it. Break larger tasks down into smaller goals that are easier to achieve. Write a list of reasons why the goal is important, and look at it every morning. Look at the list again when you are lacking motivation. Give yourself credit every time you work towards the goal, or avoid distractions.
Another step to take is to create a plan of action, where you work out what you need to do each day or each week to achieve the goal. As with the list of reasons, check the plan every day, and update it to keep track of your achievements. If you take responsibility for the goal, and take it seriously, other people take it seriously and respect if you say "No" to them in order to maintain focus.
Try to identify obstacles before they happen, and problem solve early. If something does go wrong, friends, family and online support groups can all be good sources of support. Consider that asking for help can be a sign of strength. Understand that you are likely feel discouraged and disappointed at times, but learn how to deal with negative thinking and try to laugh at setbacks while learning from them.