If you don’t have an AWS console account, we need to set that up first.
Once we have an AWS account, just go to the Lightsail console.
Tutorial: Launch and configure a WordPress instance in Amazon Lightsail | Lightsail Documentation
After selecting region, and WordPress, I opted for the cheapest plan possible.
Lightsail console has a SSH quick connect icon, which connects you to the WordPress instance. Once you get the password, you can go to the wordpress site and login with those credentials to be admin.
Make sure you create a static ip in the light sail console and attach it to the instance. This makes sure that, even when your instances restart, there is a constant ip which you don’t have to reconfigure to the domain.
You can create a Lightsail DNS zone, but I already had Route 53 configured in my previous attempt to run the WordPress site from the EC2 instance. So I just reconfigured the Lightsail to use the Route 53 settings. Now if that turns out to be expensive, I would have to do in the Lightsail.
Using Amazon Route 53 to point a domain to an Amazon Lightsail instance | Lightsail Documentation
Now AWS uses bitnami to create the wordpress instance. So there are a couple of things you have to do, once the site is up.
First thing is to have SSL certifcates installed. There are 2 ways to do it and Amazon has some really great documentation in that regard. Follow the step that works for you. Bncert tool takes the hassle away of renewing the certificate every 90 days, but Certbot allows to have a wildcard certificate, which means you dont have to create a new certificate if you have multiple subdomains to your site.
sudo /opt/bitnami/bncert-tool
Enabling HTTPS on your WordPress instance in Amazon Lightsail | Lightsail Documentation
Second thing is to remove the Bitnami banner from your site. For that follow the instructions in the following link, except you might have to change the bnconfig to bnconfig.disabled, which was my case.
sudo /opt/bitnami/apps/APPNAME/bnconfig --disable_banner 1
sudo /opt/bitnami/apps/APPNAME/bnconfig.disabled --disable_banner 1