This past weekend, I felt like undertaking an old school nerd project. I decided to see if I could host my websites on a $5/mo DigitalOcean VPS as well as I can on my $10/mo DreamHost shared hosting site. Turns out to have been a huge success.
DreamHost has been just fine for my purposes. I signed up ages ago and have a $10/mo unlimited account. Unlimited disk, traffic, domains hosted, etc. It has worked just fine. But, I don’t know if I’m getting $120/mo worth of value given how much (or little) I actually use it. At one point, in the mid 2000s when blogging was cool, I hosted sites for a few friends and family members. Over time, that’s all faded to black. All that’s really left is this site and the database remains of the others – domains long since expired.
DreamHost offered a good one stop shop for everything related to getting a site up. But, as virtualization and things like Infrastructure as a Service have started to shake up the landscape, a shared hosting service isn’t as awesome as it once was.
I looked at moving to Squarespace, but the $8/mo service for one site wasn’t giving me any value. I’ve been using WordPress for years, and (at the time) didn’t want to undertake a full blown CMS/platform migration. I wanted to lift and ship my site.
I spun up a 512MB/20GB Debian box on DigitalOcean, locked it down security-wise, and installed Apache, PHP, and MySQL. I setup the core config for running virtual domains. I rsync’d over my site, exported my database and imported it, and ta-da!
If only it was really that simple. I kept running into issues where the underlying file system path was embedded in configurations that I didn’t know about, generating random 500 errors on the backend that presented itself as a blank page in the browser. Sometimes it would load. Sometimes it wouldn’t. Time to start Googling….
The super cache plugin really did not care for being moved. It was the core of my problems. I ended up having to delete all of my plugins and reinstall them to get everything working. And that’s when I ran into a screen I had never seen before. An hour here, 45 minutes there, and it seemed to be working as well as ever.
Given that I have 512MB of RAM on my VPS, I started evaluating what I could do to streamline things further. I decided I needed to dump Apache and go to Nginx. Nginx is designed to be light and fast and not fall down under load. Just what I need!
After this point, it was normal “learning new software” hiccups. The homepage would load, but the categories would throw 404s, etc. It all came down to a few settings in the site’s nginx config file to get it to pass everything to WordPress that it should. By Sunday, everything was fully running, and I had updated my DNS and all that fun stuff.
Later, I’ll talk about Cloudflare and moving to SSL-only.