I recently moved to a new webhost (yay!) because the old is just getting way too expensive and unreliable as I barely use it and I don’t host anyone else anymore anyway. A good friend suggested that I go for DigitalOcean as he has been using for a long time and had not complaints about it thus far. I was hesitant because for their cloud hosting, you need to install everything on your own via commandline. I am used to working with WHM and cPanel for all the sites I’ve set up and managed.
I am happy to report that I have successfully migrated the sites that I have even though it took me some time and it was a relatively new process for me. Here’s a list of things that I have done with the links to the tutorials that I have used and solutions to problems I have encountered. This is not a comprehensive tutorial on what to do to get your sites running in DigitalOcean, they have tons of step by step guides on their site, and this is not an advertisement of their service. I am not a systems administrator and my experience with these is very limited. This is merely what I went through and hopefully would help someone speed the process for them as they’d see where were to go.
How To Set Up Apache Virtual Hosts on Ubuntu 12.04 LTS
I have 3 websites , hence different domain names, left housed in my old server. This means they will share the one IP address that I got from DigitalOcean. In order to do this, you’ll need to set up virtual hosts. (That .conf file you need to make things work)
How To Set Up a Host Name with DigitalOcean
Now, in order for your domain names and virtual hosts to know each other, you need to introduce the DigitalOcean name servers (i.e. ns1.digitalocean.com) to where your domain names are registered (May it be GoDaddy, 1and1.com, etc.) There’s a really good starter if you want to learn more about DNS in their website starting here – An Introduction to Managing DNS.
How To Set Up and Test DNS Subdomains with DigitalOcean’s DNS Panel
I also have some subdomains in one site like my portfolio works.rjene.com. What I have done for this is that I have treated each as a virtual host with their own .conf file. I am still thinking if this was really the way or if I could’ve added those information (i.e. point the DocumentRoot to the subdomain folder) in the domain’s original .conf file but right now it works just fine so I’m sticking with it. In DigitalOcean’s control panel, you will need to add them as a new record under the domain name.
Note: Don’t forget to activate your new .conf file with “sudo a2e site yoursub.domain.com”
Some sites I have are using WordPress. There’s a guide for installing this as well – How to Install WordPress on Ubuntu 14.04 – but for me, since I am migrating, I imported all the files and the databases.
I had some WordPress issues after this however, can’t be helped.
Only homepages loaded properly. Permalinks for Posts and Pages did not work despite .htaccess set.
For this problem, I learned I needed to update the .conf file of the site to “AllowOverride all” (Note small letters “all” – I kept seeing it being noted in the sources I’ve read).
Also, make sure you have your .htaccess file if you have Permalinks on
Images from Media Gallery were not showing on Posts because the image’s URL is still using the old site’s. Wonk. Did this mean the .htaccess rewrite rule is incomplete?
For this problem, I used a WordPress plugin to change the URLs in the posts called Velvet Blues Update URLs. I tried Add From Server plugin first to import the images but I found you had to click a checkbox for each image you want to include and that takes time.
To learn more about Permalinks in WordPress you can check out