"Motivation is like taking a bath. Once is not enough."
Spend time regularly to remind yourself of your goals especially your short term goals -
Are they written down? You should have multiple goals: short term, achievable in weeks; mid-term that may take several smaller goals to achieve; long term - achievable in perhaps 6 to 10 months; long term that should take several months to years - achievable in maybe a year or even 2 years. Focusing on the things you can accomplish soon is how you stay motivated.
"How do you eat an elephant? One bite at a time."
Don’t focus on becoming a web developer, focus on the next thing on the list. “Web Developer” will happen whether you want it to or not if you just keep putting one foot in front of the other.
Lots of good advice and thoughts here. I’ll leave one more. You have the benefit of time. Take advantage of it. It is your primary form of currency. You won’t ever have more time than you do today. Use it.