WordPress is now the most dominant CMS (Content Management System) on the market — standing head and shoulders above the competition with a good chunk of the marketshare (59.7% according to W3Tech). While they are multiple hosting solutions to build your WordPress/WooCommerce website. It’s not trivial to find a cost-efficient solution that suit best with your budget, traffic and business needs and allows you to scale without any operational overhead. That’s why in this short post, I will walk you through how to build your own blog from scratch using Amazon Lightsail VPS solution, which is fundamentally predictable, manageable, and scalable.
To get started, sign in to AWS Management Console and navigate to Amazon Lightsail dashboard:
Click on “Create instance” button to provision a new instance and select Wordpress as the image blueprint:
Upload your public SSH key (it will be used later on to ssh to the server) and set your instance type based on your blog requirements:
Set a unique name for your instance and click on “Create instance” button:
A new instance will be created and Wordpress will be provisioned on top of it:
Once the instance is up and it’s state is changed from pending to running, click on “Manage” button:
The instance dynamic public ip address will be displayed, point your favorite browser to that IP address, a Wordpress homepage will be shown as follows:
To log in to the WordPress administration dashboard, add the following endpoint /wp-admin to your url. Sign in using the default user name (user) and the default password retrieved from the bitnami_application_password file stored in the home directory on the server.
You should now arrive at the WordPress dashboard, which allows you to manage posts, pages and much more. However, we need to access our blog using a friendly URL, that’s why we will map our domain name to our Wordpress website.
If you’re expecting high traffic, it’s recommended to setup a load balancer in front of your instance. You can create one from the “Networking” section:
By default, the load balancer will accept only HTTP connections, to enable HTTPS we need to attach a valid SSL certificate.
Assign the Wordpress server created earlier to the load balancer. If your Apache service is listening on a different port, you might customize the health check part accordingly.
Once the instance is attached to the ELB, click on “Inbound traffic” section to expose an HTTPS endpoint:
Next, create a new SSL certificate for your domain name as follows:
Once AWS verifies everything the validation status will update to say Success in green. This may take some time so don’t worry if it doesn’t happen immediately. Once validated, connect the SSL certificate to the Load Balancer.
Finally, we need to import our domain name to Amazon Lightsail:
Enter the domain name, you can buy a cheap one from Godaddy.
When you create a DNZ zone, Amazon Lightsail automatically creates a name server (NS) record. Head back to your domain registrar (GoDaddy) and change the name servers for the domain to use the four NS name servers that you got in the previous step.
And create a new A record pointing to the ELB domain name:
After the configurations are propagated then you should be able to hit your site at the domain name instead of the IP address of the server through as secure HTTPS endpoint.
Drop your comments, feedback, or suggestions below — or connect with me directly on Twitter @mlabouardy.
Create your free account to unlock your custom reading experience.