Switching to a self hosted WordPress blog on DigitalOceanTutorials
Up until yesterday, my blog was hosted over at WordPress.com. WordPress.com offers a premiere WordPress experience. For $300/year, they have unlimited space for your media library, great tech support, tons of included themes, and the ability to use plugins (regardless of what other sites say). Really, my only issue is that it’s $300 a year. That’s a lot for a hobbyist like me, and I’ve been looking for a less expensive way to accomplish the same thing. Well, I’ve found the solution, plus a few tips. I’m not going to get too technical, because there’s a lot of information on the web about this, but I will cover one hurdle that took me a few days to figure out.
Here’s how I went about doing it:
- Having a domain name is a must – you can get one anywhere. I use Google Domains.
- DigitalOcean – one click install (droplet) of WordPress on a virtual machine for $5/month + $1/month for backups. Why would you not pay $1 a month for a backup?!?!
- Migrate Guru plugin to transfer my site from WordPress.com to DigitalOcean. A free option to transfer everything, but then my site wouldn’t work, I couldn’t upload anything, and I kept getting errors about changing permissions. I went down many a rabbit whole about using different Unix commands to change permissions and users, using FileZilla to change permissions, etc. Anything and everything that I found along these lines was a complete waste of time. I finally found the fix in #4 below.
- Editing the wp-config.php in the /var/www/html directory. This was the step that took me days to figure out. There are some lines of code in which you have to define where WordPress is storing information. Once I figured out that these were the three lines that needed changing, everything worked great! Here’s how I had to set them up:
- define(‘WP_CONTENT_DIR’, ‘/var/www/html/wp-content’);
- define(‘WP_CONTENT_URL’, ‘https://bershatsky.net/wp-content’);
- define(‘UPLOADS’, ‘wp-content/uploads’);
- Flickr Pro – this is my content delivery network where I can store unlimited photos, and serve them to my blog using the following plugin. $50 / year.
- Justified Image Grid – this is a onetime purchase of around $30 and gives your galleries the ability to swipe through easily like you do on Facebook, and pull images from a variety of sources like Flickr. This plugin and Flickr are essential for my photo blog. Moreover, the images are Retina ready! If a person wants to see EXIF info, they can always click the link at the bottom of the screen. Here’s an example:
- Maxima Theme from Aspire Themes – a nice and clean theme. It’s $60, but there are countless other themes that you can easily use.
- JetPack and WP Supercache are also plugins that I am running to further speed up and secure the site.
- Akismet – Automated spam blocking.
- JPEGmini Pro for uploading featured images to the media gallery – unfortunately, these cannot served by Flickr (at least I haven’t found a way).
Now, my ongoing cost will be $72/year for DigitalOcean and $50/year for Flickr Pro. All in all, about $120+ a year. Still, it’s less than half the price of WordPress.com.
I hope this helps get you started! Best of luck!!!