Hosting a WordPress blog/website on the AWS EC2 platform can be pretty useful when you know how to maintain Linux servers and want to keep your cost down. (Free for your account first year / then around 10-30 €/month) This is great for a small personal blog where you’ll do the maintenance and scalability yourself. (OS, databases and WordPress upgrades) If you need something more robust and scalable, I usually advise going for an AWS elastic beanstalk application to have the database and EC2 maintained and scaled automatically. (More like 30-60€/month)

In this post, I’ll show you how I like to host WordPress on EC2 with a Let’s Encrypt SSL certificate.

Start by following the, up to date, AWS documentation on how to install WordPress on EC2 and register your domain on Route 53 :

curl -O

php wp-cli.phar search-replace '' '' --path=/var/www/html --skip-columns=guid

Once this is set up and you have your ssh access run those commands :

Once all of those commands are successful, I usually install the ReallySimpleSSL Plugin to modify all your WordPress files to be SSL compliant.

That’s it your website is automatically redirected to https! (Look for the green lock next to your URL)

Note: If after all those steps you can’t load your site, check your EC2 Security Group Inbound Rules, it needs to allow SSL protocol everywhere.

Was this post helpful?