I migrated to Digital Ocean

It was about one year that this site was hosted on a VPS server of Leaseweb. They provided a good set of specs but had some amount of unreliability when it came to providing 24×7 up-time. Also it once had a service outage that resulted in the loss of our data. Thanks to offline backups and Google cache I was able to restore all my posts. So it was high time before we moved onto something more trustworthy. It was then when I came to know about Digital Ocean, an SSD only VPS hosting provider. After a lot of geeky research I realized how quickly they grew their scope to provide a quality platform for VPS.
What follows next in this article is the story of how I migrated to DigitalOcean with help from my friends. Be warned that this article is fairly technical and can also serve to anyone who wants to migrate to DigitalOcean. I wholeheartedly thank Aaruni for his help on setting up the server, without his help it could have taken me days to do the same.

1. New Server on DigitalOcean (DO) VPS

There are numerous VPS providers but none at the feature to price ratio which DO provides. Hence me and my online friends decided to go for the most basic plan of $5 per month, which provided us with following features:

  • 512MB Memory
  • 1 Core Processor
  • 20 GB SSD Disk Space
  • 1TB Transfer Bandwidth

This configuration is modest to run a Unreal Tournament (UrT) gaming server and to host numerous small websites which were our requirements. Plus its easy to upscale so starting from the smallest option seemed to be a wise decision.

2. Creating a Droplet

Each private virtual server in DigitalOcean terminology is said as a “droplet”. And one can create any number of droplets with any configuration and plan. I created one droplet and with little help with friends decided to install Debian 32 bit OS on it since Debian is lighter than Ubuntu and on 512 MB RAM it was the only good choice.

3. Backup of Old VPS Data

First and the foremost thing which was required to migrate from krow.me to my own server was the backups of old server. Now that I had another VPS I could simply copy files from krow.me server to my own. I did that via rsync command:

rsync -azvv -e ssh username@hostname:~/ ~/destination_path

After old file dump was backed up on my droplet I took a dump of the old SQL database. This database dump would be required later to restore the articles, posts and comments on my site at new host.

4. Setting up LAMP Stack on droplet:

Next thing was a tedious job of installing LAMP on the droplet I created on DO. As per Aaruni’s suggestion I hadn’t installed any application while creating the droplet since DIY is apparently more fun.
LAMP is a software bundle which stands for:

  • Linux
  • Apache
  • MySQL
  • PHP

Now the L part was completed by creating droplet and installing Debian on it. The A part stands for Apache, but we went with nginx which is an alternative to Apache.  We choose nginx since it runs faster than Apache and is best if the content it serves is mostly static (great for WP based sites). We installed and started nginx by following commands:

sudo apt-get update
sudo apt-get install nginx
sudo service nginx start

MySQL database was the next thing which was to be installed. We instead installed MariaDB (alternative to MySQL) and then PHP through following commands.
Mariadb:

sudo apt-get update
sudo apt-get install mariadb-server

PHP:

sudo apt-get install php5-fpm

We also installed PHPMyAdmin which provides a front-end to MySQL and can be used via browser:

sudo apt-get install phpmyadmin

But the main and most important thing was to configure nginx. Aaruni set it up like it was setup on krow.me. The main domain points to a static HTML page where we can host any content. (In fact, anything pointing to the VPS points to the static HTML page.) It will probably be use to host maps for UrT by ico, another member sharing my VPS, while the domain vineetkumar.me points to my site.

5. Configuring WordPress

I had two options. I could have installed WordPress again and then restore the database, but I decided to simply copy the existing WordPress installation to my new VPS since the directory structure was exactly the same. After copying the files I just had to restore the SQL database and my site was up and running in no time.
I am not sure whether it’s just  placebo but I already feel the new site is faster than before. I hope DigitalOcean will prove to be a good experience and I can use it to host many more sites in the future. Meanwhile if you want to give DigitalOcean a shot you can do so by using my referral link to get $10 credit. Using this free credits you can use the $5 plan for two months, while I would be getting some credits myself if you continue with DigitalOcean. So a win-win scenario for both. Even if you don’t continue you can still try DigitalOcean free of cost.

The hopefully friendly shark of DigitalOcean

One thought on “I migrated to Digital Ocean

Leave a Reply

Your email address will not be published. Required fields are marked *