Deploy WordPress on AWS Lightsail

Written by Raz

Raz Rahman is an IT Management Professional working for a Fortune 20 Company. He has built successful Engineering and Operations teams supporting critical workloads both on-premise and in the Cloud. He has a passion for all things web and specializes in WordPress Hosting on AWS. When not thinking about technology, Raz loves all things Disney, bears (the animal), and BBQ!

December 5, 2020

Thank you for checking out this post!  Please note that the information is provided for general informational and educational purposes only and is not a substitute for professional advice.  If you have any questions or concerns, please leave a comment on the post!

In this post, we’re going to go over how to get up and running with a Bitnami WordPress stack on AWS Lightsail. AWS Lightsail is one of the easiest to use cloud platforms to get a server up and running quickly. Compared to other Virtual Private Servers (VPS) Hosting providers, Lightsail is typically cheaper and easier to run. At the time of writing, the smallest instance is only $3.50 USD/month.

If you want to start a small blog, I recommend spinning up a Lightsail instance and giving it a go.

AWS Management Console


Login to the AWS Management Console and navigate to “Lightsail”.

If this is your first time logging into Lightsail, you’ll get a language selection prompt and then a Welcome to Lightsail message.

Create an Instance/Server


Once you’re at the Lightsail homepage, click on Create Instance. And select the following options:

Instance location: Select a region that is closest to your end users. For example, if you reside on the East Coast of the USA, you might want to select Virginia or Ohio. If you’re in Europe, selection a location in Europe.

Instance Image: Linux/Unix

Blueprint: WordPress. This will use a Bitnami stack that has everything you need set up and ready to go including Apache, mySQL (Database), and pHp.


Default SSH Key: I always like to create a new one specific to the instance’s purpose. For example, I will create one called tutorial.3techies.io. Generate the key pair and immediately download it (you will only be able to download it once!) and save it in a safe location. This key will give access to your server, so do not share it.

Instance Plan: This the size of the server that you will get and lets you know how much CPU, Memory, and Storage that you will get. For this example that we are going to shutdown quickly, we’ll use the cheapest instance; however, if you have a lot more users or expect a lot of traffic, select a higher plan. If you’re running large production workloads, you may want to go with a Multi-Tier architecture and stick with the traditional AWS Offerings. Check out our series on how to create a scalable WordPress installation on AWS.

Identify Instance: Name your instance so it is easily recognizable

Then click on “Create Instance”

After you wait a few minutes, you’ll see that your instance goes from a “Pending” status to “Running” status which means the server is up and running!

Attach an IP Address


Click on the instance name to get to additional information about your instance/server. AWS Lightsail gives the server a public IP address immediately; however, this IP may change when you reboot the server. Thus, if you are going to direct traffic to this instance, it is best to give it a static IP. Click on the “Networking” tab, and then click on “Create Static IP”.

From the drop down, select the instance you just created, give the IP address a friendly name and then click on “Create”.

You’ll now see that your instance has a different IP address from before. And you can type in http://IP_ADDRESS in your browser to see the default WordPress site!

Configure DNS


It’s great that your WordPress site on AWS Lightsail is now running; however, it’s not great to have users type in an IP address to visit your site. Therefore, simply go into your DNS provider, and create an “A Record” that will point your domain or subdomain to the static IP address you just created.

In our example, I want to use the address tutorial.3techies.io; thus, I create the following A record.

After you wait some time for the DNS to propagate through the Internet, your site will be visit at the address you created. Please note that some DNS providers such as CloudFlare are extremely quick and I’ve seen records update in as little as 1 minutes; whereas, other providers truly take 24-72 hours.

Note: Some of you may notice that I’m proxying my DNS through CloudFlare in a few screenshots above; therefore, a valid SSL certificate is provided directly by CloudFlare (first screenshot below). However, if your’e not using CloudFlare, then you won’t have the secure PadLock on your site (second screenshot below) and we’ll show you how to configure a Free Let’s Encrypt Certificate in a future post!

Login to the WordPress Admin Panel


So you now have a working WordPress site that you can access, but you have no idea what your login and password are. This is there it helps to know a little bit of the Linux command line.

The easiest way to find out the password to your site is to Connect via the AWS Lightsail User Interface. You can also SSH into your instance via an SSH Terminal of your choice (PuTTY, Termius, Moba, etc). Your user name is “bitnami” and then you must use the key we created when launching the instance (the *.pem file you downloaded earlier).

To login via the AWS Lightsail UI, simply go to the instance page and then click on “Connect using SSH”.

Once you successfully connect using the UI, you’ll see the following screen.

Then type in the following command to get your password.

cat bitnami_application_password 

You will then see the password output in the terminal which you should copy.

Next navigate to http://YOUR_SITE_OR_IP/wp-admin to login.

Type in “user” for your Username and enter in the Password from above. Click “Login In” and you’ll be taken to the backend for WordPress

Server and WordPress Enhancements


At this point, you have a fully functional WordPress site on AWS Lightsail and you can begin designing and blogging to your hearts content!

However, there are a few more tweaks and enhancements that you can make. Bitnami does a great job at providing out of the box configurations for your instance size. Through experience, there are a few settings that I change to make life easier, and slightly boost page load times. Your mileage may vary!

  • Create a new administrative account and delete the default “user” account
  • Install a Free Let’s Encrypt SSL Certificate so your users get a secure site
  • Remove the Bitnami banner that displays in the bottom right of the screen
  • Increase the pHp upload limits for media, and in case you are importing a site via a plugin
  • Edit the pHp memory limit
  • Edit the pHp execution time and input variables
  • Turn off Apache Pagespeed (you read that right)
  • Enable Apache modules for common WordPress functionality/plugins
  • Install some basic security plugins

We will cover all the above items in a brand new blog post soon! Stay tuned and thank you for reading. Leave any questions or comments below.

You May Also Like…

0 Comments

Trackbacks/Pingbacks

  1. Configure Wordpress on AWS Lightsail - Razib Rahman - […] you’ve been following along on how to Deploy WordPress on AWS Lightsail, you should now have a working WordPress…

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.