Tutorial: Launch and configure a WordPress instance in Amazon Lightsail
Last updated: November 1, 2018
Amazon Lightsail is the easiest way to get started with Amazon Web Services (AWS) if you just need virtual private servers. Lightsail includes everything you need to launch your project quickly – a virtual machine, SSD-based storage, data transfer, DNS management, and a static IP – for a low, predictable price.
This tutorial shows you how to launch and configure a WordPress instance on Lightsail. It includes steps to connect to your instance by using SSH, sign in to your WordPress website, create a static IP and attaching it to your instance, and create a DNS zone and mapping your domain. When you’re done with this tutorial, you have the fundamentals to get your instance up and running on Lightsail.
These steps are covered in the following sections of this tutorial:
Step 1: Sign up for AWS
Step 2: Create a WordPress instance in Lightsail
Get your WordPress instance up and running in Lightsail. For more information about creating an instance in Lightsail, see Creating an Amazon Lightsail instance in the Lightsail documentation.
Sign in to the Lightsail console.
On the Instances tab of the Lightsail home page, choose Create instance.
Choose the AWS Region and Availability Zone for your instance.
Choose your instance image.
Choose Linux/Unix as the platform.
Choose WordPress as the blueprint.
Choose an instance plan.
A plan includes a low, predictable cost, machine configuration (RAM, SSD, vCPU), and data transfer allowance. You can try the $3.50 USD Lightsail plan without charge for one month (up to 750 hours). AWS credits one free month to your account.
Enter a name for your instance.
Choose one of the following options to add tags to your instance:
Add key-only tags or Edit key-only tags (if tags have already been added). Enter your new tag into the tag key text box, and press Enter. Choose Save when you’re done entering your tags to add them, or choose Cancel to not add them.
Create a key-value tag, then enter a key into the Key text box, and a value into the Value text box. Choose Save when you’re done entering your tags, or choose Cancel to not add them.
Key-value tags can only be added one at a time before saving. To add more than one key-value tag, repeat the previous steps.
For more information about key-only and key-value tags, see Tags in Amazon Lightsail.
Choose Create instance.
Step 3: Connect to your instance via SSH and get the password for your WordPress website
The default password to sign in to your WordPress dashboard is stored on your instance. Retrieve it by connecting to your instance using the browser-based SSH terminal in the Lightsail console and running a special command. For more information, see Getting the application user name and password for your Powered by Bitnami' instance in Amazon Lightsail in the Lightsail documentation.
On the Instances tab of the Lightsail home page, choose the SSH quick-connect icon for your WordPress instance.
After the browser-based SSH client window opens, enter the following command to retrieve the default application password:
If you're in a directory other than the user home directory, then enter
Make note of the password displayed on the screen. You use it later to sign in to your WordPress dashboard.
Step 4: Sign in to the administration dashboard for your WordPress website
Now that you have the password for your WordPress dashboard, you can sign in. You can change your password, install plugins, change the theme of your website, and more. For more information, see Getting the application user name and password for your Powered by Bitnami' instance in Amazon Lightsail in the Lightsail documentation.
In a browser window, go to:
http://<public IP address>/wp-login.php
Make sure to replace <public IP address> with the public IP for your WordPress instance.
In the Username or Email Address box, enter
In the Password box, enter the default password obtained earlier in this tutorial.
Choose Log in.
You are now signed in to your WordPress dashboard where you can perform administrative actions on your website. For more information about administering your WordPress website, see the WordPress Codex in the WordPress documentation.
Step 5: Create a Lightsail static IP address and attach it to your WordPress instance
The default public IP for your WordPress instance changes if you stop and start the instance. A static IP address, attached to an instance, stays the same even if you stop and start your instance.
Create a static IP address and attach it to your WordPress instance. For more information, see Create a static IP and attach it to an instance in Amazon Lightsail in the Lightsail documentation.
On the Instances tab of the Lightsail home page, choose your running WordPress instance.
Choose the Networking tab, then choose Create static IP.
The static IP location, and attached instance are pre-selected based on the instance that you chose earlier in this tutorial.
Name your static IP, then choose Create.
Step 6: Create a Lightsail DNS zone and map a domain to your WordPress instance
Transfer management of your domain's DNS records to Lightsail. This allows you to more easily map a domain to your WordPress instance, and manage all of your website’s resources using the Lightsail console. For more information, see Creating a DNS zone to manage your domain’s DNS records in Amazon Lightsail in the Lightsail documentation.
On the Networking tab of the Lightsail home page, choose Create DNS zone.
Enter your domain, then choose Create DNS zone.
Make note of the name server addresses listed on the page.
You add these name server addresses to your domain name’s registrar to transfer management of your domain’s DNS records to Lightsail.
After management of your domain’s DNS records are transferred to Lightsail, add an A record to point the apex of your domain to your WordPress instance, as follows:
In the DNS zone for your domain, choose Add record.
In the Subdomain box, enter an @ symbol to map the apex of your domain (such as example.com) to your instance. The @ symbol explicitly symbolizes that you’re adding an apex record. It is not added as a subdomain.
In the Maps to box, choose the static IP that you attached to the WordPress instance in the previous step of this tutorial.
Choose the save icon.
Allow time for the change to propagate through the internet's DNS before your domain begins routing traffic to your WordPress instance.
Here are a few additional steps you can perform after launching a WordPress instance in Amazon Lightsail: