How To Create A WordPress Website In AWS Lightsail?
Hello Everyone
Welcome to CloudAffaire and this is Debjeet.
There are multiple ways you can host a WordPress website in AWS, you can create an EC2 instance and then install and configure Apache, WordPress and database on the EC2 instance or use EKS service if you want to use containers. But the easiest and cheapest way is to use Lightsail service to host your WordPress website.
Amazon Lightsail provides easy-to-use cloud resources to get your web application or websites up and running in just a few clicks. Lightsail offers simplified services such as instances, containers, databases, storage, and more. With Lightsail, you can easily spin up websites or applications using pre-configured blueprints like WordPress, Prestashop, or LAMP. You can use Lightsail features to simply host static content, connect your content to an audience around the globe, or get your Windows Business server up and running. The Lightsail console guides you through the configuration process, and in many cases, has components already configured.
How To Create A WordPress Website In AWS Lightsail?
Prerequisites:
One active AWS account, email id and phone number.
Step 1: Login to AWS management console.
Step 2: Navigate to Lightsail console.
Step 3: Click on “Create Instance” to create a new instance.
Step 4: Select the instance location and OS.
Note: AWS has datacenters across globe, choose the location where your target audience resides.
Step 5: Select the application that you want to use, in our case it will be WordPress.
Step 6: Download the SSH key which will be used to connect to the instance.
Optionally you can add a user script that gets executed before your instance is being launched. You can also enable backup of your instance by enabling snapshots.
Step 7: Choose the instance plan based on your requirements.
Step 8: Provide a name to your instance and click “Create Instance”.
Once your instance is created, you need to retrieve the WordPress admin password.
Step 9: Connect to your instance and get the WordPress admin password.
Click on the command line icon.
Get the WordPress admin password.
1 |
cat $HOME/bitnami_application_password |
Next, we will create a static IP address for our website.
Step 10: Go to networking tab and click “Create static IP”.
Step 11: Select your instance from the drop-down and provide a name to the static IP address and finally click “Create”.
Note down the static IP address which will be used to create the DNS record next.
Next, we will create the DNS record to map our instance static IP with the domain name that we have registered. We will use route53 as our domain registrar. If you are using a different registrar like GoDaddy, you need to login to your registrar website and create the A record there.
Step 12: Create an “A” record using the static IP address in your domain registrar.
Navigate to Route53 => hosted zone => your domain name that you have registered => Create record
Provide the static IP address and click “Create records”.
Now if you type your domain name in the browser, you will redirected to a brand-new WordPress website.
Step 13: Go to wp-login page for your website using below link and login to WordPress dashboard.
http://PublicIpAddress/wp-login.php
OR
http://DomainName/wp-login.php
The Username should be “user” and password you have already copied in step 9.
We have successfully created the WordPress website, now it’s a good time to complete your site setup.
Hope you have enjoyed this article. In the next blog we will enable SSL (https) for this WordPress Website.
To get more details on Lightsail, please refer below official documentation.
https://lightsail.aws.amazon.com/ls/docs/en_us/all