Self-Hosting WordPress on DigitalOcean

You may have noticed Syllepsis was down for a month or so. I assumed no one would care, but apparently some people do actually read this.

Please comment and give me feedback if this website has problems. Currently loading is super-slow because it makes you load all images at once… I do plan to fix that at some point.

The story is that I was moving from WordPress.com to self-hosted WordPress.org. WordPress.org refers to WordPress the open-source software, used by, according to them 33% of the internet, which is pretty impressive. WordPress.com is the for-profit arm of wordpress.org, which hosts and runs a simplified version of the wordpress tool. I wanted full control and more options, furthermore I wanted a bit of web-developer experience so I decided to build the new site from scratch, from an Ubuntu VM on Digital Ocean.

Why DigitalOcean.com? Because they are cheap and very user-friendly. I’m running their cheapest $5/month VM droplet, and everything runs okay so far, to my surprise. I will upgrade at some point if things get slow. Setup for me (a data scientist, not a web developer) a couple of hours total, and was very easy. Minimal familiarity with Linux is the only prereq I would say for this process.

The tutorials below walk through the process, you can easily find your own information. Two things not in the tutorials I found useful were:
sudo nano /var/log/nginx/error.log – the directory of logs, this came in handy when I got a 502 error, one of my configs (from a tutorial) was pointing to php7.2 and I had setup with 7.3.

define ('EMPTY_TRASH_DAYS', 7); in the wp config file, a random tidbit to slightly speed things up, I hope… Recycle bin cleaning.

Tutorials I followed:

https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lemp-on-ubuntu-18-04
https://www.wpintense.com/2018/10/20/installing-the-fastest-wordpress-stack-ubuntu-18-mysql-8/
https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04
https://www.digitalocean.com/docs/networking/dns/how-to/manage-records/
https://www.digitalocean.com/community/tutorials/how-to-increase-pagespeed-score-by-changing-your-nginx-configuration-on-ubuntu-16-04
https://developers.google.com/speed/pagespeed/insights/
https://www.linode.com/docs/security/using-fail2ban-for-security/

1 thought on “Self-Hosting WordPress on DigitalOcean”

Leave a Comment

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