Turn off the Wifi
Set a timer like ZT said
If you have a laptop, don't charge it.
If you use a phone, don't charge it.
Tell yourself you are going to work on a productive activity for at least 5 minutes a day. Usually after those five minutes, you want to do more. This works for reading, exercising, gardening, etc.
Get the "productive" app. I use this. I have, for example, "read the Bible" on it...set for everyday. So if I miss a day...I don't have a perfect streak anymore. The streaks motivate you to keep doing it.
I know this might seem counter to what you want...but I get really motivated to be productive by watching motivational speeches and productive videos on youtube.
Here is a good one...
Hopefully all that helps you. If not, there are so many ideas online that can teach you. There are also add ons and apps that block certain websites like facebook so that you don't waste time on them.