WordPress + DigitalOcean + HTTPS (letsencrypt)

If you installed the one-click WordPress installation with your Digital Ocean droplet, you might still have issues getting https to work. If you go https://yourcomain.com in a browser and see an error, there are a few steps you can do to troubleshoot this.

cd /etc/letsencrypt

If you have no such directory, this means you never set up the TLS certificate, and you’ll need to do that. Here are some instructions from Digital Ocean.

Now you should have a directory called live. If you don’t, you need to set up HTTPS for your domain with letsencrypt.

sudo certbot --apache -d yourdomain.com

You’ll be asked if you should redirect all traffic to https. I’d recommend that you do this, since there’s no reason to keep users on an insecure connection. Also, most browsers nowadays show a warning if you enter a site without https, which becomes bad UX.

Now, go to https://yourdomain.com, and your TLS set-up should be working!

Leave a Reply