Skip to content
cnandreu
2 min read

Goodbye AppFog, Hello DigitalOcean

Moving my blog to a $5 DigitalOcean droplet and setting up WordPress on nginx, PHP, and MySQL from scratch.

I decided I wanted a bit more control over my blog, and my own custom domain (cnandreu.com). Soon after, I remembered a benchmark post comparing DigitalOcean and Linode I saw a few months back. The article concluded DigitalOcean provided great bang for the buck, so I decided to try it. I’ll go a bit into the logistics of setting up a WordPress blog there.

Specs

DigitalOcean is a Virtual Private Server (VPS) provider. It basically provides the hardware to host your own virtual machine. Their cheapest plan:

  • $5/month
  • 1 Core
  • 20GB SSD Storage
  • 512 MB Memory
  • 1TB Transfer
  • 99.99% Uptime

2 months free

I found a coupon code online for a $10 credit (i.e. 2 months free). When you sign up, click to add a credit card and then apply the following code: OMGSSD10.

Pick a Droplet

Amazon EC2 calls them Instances; DigitalOcean calls them Droplets. It’s just a virtual machine running on their hardware.

I installed 32-bit Ubuntu 12.04 LTS. I picked that one because I’m already familiar with the operating system. There was no need to go with the 64-bit version because my plan only gives me half a gigabyte of RAM. It also seemed like a good idea to go with an LTS (Long Term Support) release for a server. Some of the articles I link below target 12.04 as well.

Initial setup

DigitalOcean’s initial server setup guide describes some initial configuration: how to log into the droplet via SSH, change the root password, create a new user, give the new user sudo privileges, and optionally configure SSH.

Fail2Ban

They also have an article that explains how to set up Fail2Ban. This is useful because it will help prevent attackers from brute forcing your password.

nginx, PHP, and MySQL

nginx (pronounced “engine x”) is an open source web server and reverse proxy server for HTTP, SMTP, POP3, and IMAP protocols, with a strong focus on high concurrency, performance, and low memory usage. PHP is a popular programming language for web applications. MySQL is a popular relational database manager.

Their LEMP stack guide explains how to set up those technologies. Together they form the software stack that will run WordPress.

WordPress

Now that you have an HTTP server (nginx), a programming language (PHP), and a database (MySQL), you can follow the WordPress on nginx guide.

Sequel Pro or phpMyAdmin

If you want to see the data inside your MySQL database, I recommend Sequel Pro. Mac only — sorry, Windows and Linux users. Non-Mac users may want to read the phpMyAdmin on LEMP guide; it explains how to set up the web-based MySQL database viewer called phpMyAdmin.