Migrating WordPress to DigitalOcean

UPDATEJon B. left a great tip in the comments: if you’re looking to setup WordPress on Digital Ocean (or any VPS), check out EasyEngine. I finally tried it out and think it’s a pretty slick process.

This week I took the plunge and finally transferred this site from Hostmonster/Bluehost to a VPS on Digital Ocean. There were a few gotchas, but I was able to Google search my way through everything and finally say goodbye to my shared hosting environment.

In a nutshell, here’s what I did:

  1. Create a new droplet at Digital Ocean. Digital Ocean has a few images you can choose from, including one that comes preinstalled with WordPress. Rather than using this, however, I opted for a vanilla Ubuntu 14.04 installation.
  2. Follow the Digital Ocean tutorials on setting up the server. I’m no sysadmin, but I’m getting better at configuring web servers, etc. For this project, I decided to try using Nginx as the web server for my droplet and WordPress installation. This tutorial came in handy: How To Install WordPress with Nginx on Ubuntu 14.04. I ran into some issues with permissions, but was able to figure it all out with a few quick Google searches.
  3. Migrate WordPress. There are a few different ways to migrate a site, including services like ManageWP. For this project, however, I decided to do it all manually. I did a dump of the database and uploaded that into my new MySQL database on Digital Ocean and then zipped up all the WP files and moved them over to Digital Ocean as well. This might’ve been overkill to move all files (wp-content is usually the only directory with site-specific content), but it worked. And because I wasn’t moving to a different domain, I didn’t need to go through the database and change references to images, links, etc.
  4. Update DNS. I used AWS Route 53 for the DNS management, just so I could try it out. Creating a new hosted zone gave me 4 DNS servers, which I set as the name severs for my domain (purchased through Hostmonster). I then pointed the A record to the IP address of my droplet. I also set the CNAME to point traffic to the non-www version of the domain.

That’s it. It took a few hours to get through, and the DNS propagation took about a half hour, but now I’m up and running with my WordPress hosted on a dedicated IP address for only $5/month. Now I can install an SSL certificate for my domain (which you can’t do at Hostmonster unless you pay extra for a dedicated IP address).

For those who are interested in hosting more than one domain at Digital Ocean, you can do this on the same box with virtual hosts (Apache) or server blocks (nginx). Setting this up will tell your web server which directories to serve up when a certain domain is called. You’ll need to associate each domain with your account, though, either through Digital Ocean’s console or through a service like Route 53 with an A record.

Just a heads up: keep in mind that Hostmonster/Bluehost offer unlimited disk space and bandwidth. Digital Ocean places limits on both depending on which server size you purchase.

This Post Has 7 Comments

  1. Spencer, I saw your reply on the ISys list and happened to land here naturally while searching for migrating Hostmonster to Digital Ocean. Hostmonster allows you to host unlimited sites. I’ve probably got 15 or so on my account. Can you do that with Digital Ocean as well?

    1. Using virtual hosts (Apache) or server blocks (Nginx), you can run multiple domains from the same server on Digital Ocean without a problem. The only issues you might run into are storage space and monthly bandwidth allowance. In theory, hosting 15 domains from a single droplet is doable.

  2. Hey Spencer,
    Great post! I’m working on this myself.

    Now that you’ve weaned off of the shared hosts which email server are you using?

    1. Looks like a great resource, thanks for sharing! If you tackle it before I do, let me know what I should watch out for 🙂

  3. I love EasyEngine for sites on DO. It is perfectly tuned to WordPress and I’ve had a lot of luck moving sites from expensive dedicated virtual servers to $10-$20 per month digital ocean instances, while still handling lots of traffic. Plus the setup takes care of a lot of manual steps. Thought this might be helpful! https://rtcamp.com/easyengine/

Leave a Reply

Close Menu