I’ve recently started launching WordPress sites – starting with Talitha, and now this site. In my haste to move a few sites that seemed like they’d work better as WordPress sites, I appear to have over-loaded my single Digital Ocean droplet, so it’s time to spin up a new one.
As ever with Digital Ocean, they have an incredibly good tutorial on setting up WordPress on Ubuntu1, but since I like automating things, I thought it was worth recording the steps I took (partly for my reference). First off, I ran a slightly modified version of my Digital Ocean set up script2. This script does a few things (mostly based on Bryan Kennedy’s excellent post on getting a new server configured):
- Installs all the things (emacs, git, fail2ban etc);
- Sets up a non-root user, and prevents logging in as root, or logging in with passwords;
- Set up automated security updates.
- Run through the steps in another tutorial for securely applying WordPress updates.
Once I’d done that, getting WordPress installed just took a few steps:
sudo apt-get install mysql-server php5-mysql sudo mysql_install_db sudo /usr/bin/mysql_secure_installation sudo apt-get install php5-fpm
From there, I needed to:
- SCP the old WordPress site over to my new droplet (both the files and the MySQL database);
- Repoint my DNS records to point to the new droplet;
- Set up my new SSL certificates from Let’s Encrypt (I’ve been meaning to write about my Let’s Encrypt set-up for a while – it’s simple, but works well for the low traffic sites I look after).
If you’re reading this, the process worked!