How to Install WordPress on Amazon Lightsail: Complete Guide

Written by Colin Newcomer
Written by Colin Newcomer

Last updated on 20 Dec 2022

Amazon Lightsail offers affordable VPS instances powered by Amazon Web Services. In this step-by-step tutorial, you'll learn how to install WordPress on Amazon Lightsail.

WP Mayor is supported by its audience. If you purchase through a link on our site, we may earn a commission. Here’s why you can trust us.

6-minute read

Table Of Contents

Table of Contents

Introduction

Want to install WordPress on Amazon Lightsail but not sure where to start?

With its pre-made application blueprints, Amazon Lightsail makes it very easy to get up and running with a fully functioning WordPress site.

In this step-by-step tutorial, you’ll learn exactly how to set everything up.

By the end, you’ll have a working WordPress site on Amazon Lightsail, completely with a custom domain name and a free SSL certificate from Let’s Encrypt.

Let’s dig in!

How to Install WordPress on Amazon Lightsail

Here’s a high-level look at how to install WordPress on Amazon Lightsail – keep reading for the full instructions:

  1. Create a new instance in Amazon Lightsail
  2. Access your WordPress credentials to log into WordPress
  3. Attach a static IP address to your instance
  4. Point your domain name to your instance
  5. Install a free SSL certificate from Let’s Encrypt

1. Create a New Instance

To get started, log in to the Amazon Lightsail dashboard.

If this is the first time that you’re using AWS, you might need to create an account before you can access the dashboard.

Once you’re in the Amazon Lightsail dashboard, click the button to create a new instance:

Create an instance

On the next screen, choose Linux/Unix as the platform and then select the WordPress blueprint (both of these should be selected by default).

WordPress blueprint

Further down the page, you can choose your instance plan, which controls the resources and price of your server.

While you’re free to choose any plan, I recommend the $5 instance for most WordPress sites, which gets you 1 GB of RAM and 1 vCPU.

As long as you use caching and don’t have a lot of dynamic content, this plan alone should be able to support hundreds of thousands of visits per month.

Instance plan

Below that, you can give your instance a name, which will help you remember it.

Once you’ve made your choices, click the Create Instance button at the bottom to spin up your instance.

Name your instance

Now, you’ll have a short wait while Amazon Lightsail creates your instance.

Once it’s finished, you should see the instance appear in your AWS Lightsail dashboard:

Instance dashboard

To open the dashboard for just this instance, click on the instance name.

2. Access Your WordPress Credentials

At this point, you already have a working WordPress website.

You can access it by pasting the Public IP into your browser address bar:

WordPress site

However, what you don’t have yet is your WordPress username and password, so you can’t log in to your site yet.

By default, your WordPress site will use user as the username. However, to access the password, you’ll need to use the command line. But don’t worry! It’s pretty easy and it doesn’t require installing any new software.

To get started, open the browser-based SSH client for your instance, which you can do by clicking the Connect using SSH option in your instance dashboard:

Connect using SSH

This will open a popup command line interface that you can work with in your browser.

There’s no need to log in or authenticate or anything – everything is ready to go.

To access your WordPress user password, all you need to do is paste in the following command and hit enter.

cat bitnami_application_password

You should then see your password appear – copy it to a safe place so that you can use it to log in:

Run the command to access password

Now, you can log in to your WordPress install using the following credentials:

  • Username: user
  • Password: from the terminal window above

3. Attach a Static IP Address to Your WordPress Instance

While you can already access your WordPress site from the public IP address of your instance, you can’t rely on this public IP address as-is.

That’s because, with the current configuration of your instance, the public IP address will change each time you stop/start your instance.

So if you pointed your domain name to this public IP address, the domain connection would stop working if you ever restarted your instance.

To fix this, Amazon Lightsail lets you attach a static IP address to your instance at no extra cost.

Once you attach the static IP address, your instance will always have the same IP address no matter what.

To create one, go to the Networking tab in your instance’s dashboard. Then, click the Attach static IP option:

Attach static IP

This will open a popup. Give your static IP address a name and then click the Create and attach button:

Add a name for your IP

Now, your instance will have a new, static IP address. You should see this reflected in the Networking tab of the instance dashboard, as well as the information summary in the top-right corner.

Instance using static IP

4. Point Your Domain Name to the Static IP Address

Now that you’ve attached a static IP address to your instance, you’re ready to point your domain name to your instance.

This will let you access your WordPress site by entering the domain name, instead of needing to use the IP address.

To set this up, you’ll need to work from wherever you manage your domain’s DNS records. Typically, this will be your domain registrar. Or, if you’re using a service like Cloudflare, you’ll manage these records from your Cloudflare dashboard.

Alternatively, you can also transfer DNS management to Lightsail so that you can manage DNS records using the Lightsail console, though this requires a few extra steps.

The simplest option is to just go to wherever you manage your domain’s DNS records and add the following records:

Record TypeContentValue
A@[static IP address]
CNAMEwwwyoursite.com

This assumes you want to use yoursite.com and not www.yoursite.com.

Here’s what it looks like at Cloudflare:

Cloudflare DNS

Now, you can access your WordPress instance by entering your domain name:

WordPress site with custom domain

Your WordPress site should automatically detect the correct domain name. But to double-check, you can go to Settings → General and verify that your domain name shows up as the WordPress Address and Site Address.

5. Set Up Your SSL Certificate

At this point, you have a working WordPress website that’s accessible via your domain name.

For the last bit of the process, you’ll want to install an SSL certificate so that your site can benefit from HTTPS.

As part of the WordPress blueprint, Amazon Lightsail and Bitnami install the fundamental tools that you need to set up a free SSL certificate via Let’s Encrypt.

However, to enable the SSL certificate, you’ll need to run a few commands in the in-browser terminal window.

Go back to your instance dashboard and open the in-browser terminal window by clicking the Connect using SSH option.

Then, run the following command:

sudo /opt/bitnami/bncert-tool

You might see a prompt to update bncert. If you do, just enter Y. Then, run the command above again.

Now, enter the non-www and www versions of your domain name, separated by a space, and hit enter. Here’s an example:

yoursite.com www.yoursite.com

Run bncert tool

You’ll then see a prompt to enable HTTP to HTTPS redirection. Enter Y to enable it and hit enter.

You can then choose between setting up a non-www to www redirection or the reverse.

Finally, you’ll see a summary of your choices. If everything looks good, enter Y and hit enter to finalize the configuration.

Configure bncert

As part of the setup, you might need to enter an email address to use with Let’s Encrypt.

And that’s it! Once Bitnami finishes (it should only take a few seconds), you’ll now be able to use HTTPS on your site.

If you visit your site, you should now see the green padlock.

WordPress site with SSL certificate

Your site is now ready to go.

Create a WordPress Site With Amazon Lightsail

With Amazon Lightsail, you can easily spin up a WordPress site powered by Amazon’s cloud network.

The pre-built blueprints help you get up and running in just about 15 minutes, all without needing any special technical knowledge.

The Lightsail blueprints also can handle important details such as installing a free SSL certificate from Let’s Encrypt.

If you want to try it out for yourself, you can get your first three months free when you create a new instance.

Give it a shot today and you’ll be up and running in no time.

<span style="font-weight: 400">Written by: </span>Colin Newcomer
Written by: Colin Newcomer

Colin has been using WordPress for over a decade and is on a quest to test all 60,000+ plugins at WordPress.org. He has been a Writer and Product Review Expert for WP Mayor since 2017, testing well over 150 products and services throughout that time.

Supported by our trusted partners

Quick Links

Did you find this article helpful?

Share Your Discovery

Leave a Reply

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

 Discover more tips and tools. 
Join 5000+ designers, developers, and website builders that come to WP Mayor to find the best guides, tools, and services for their next website. One email every week.
WP Mayor Newsletter

2023 Reader Survey

What would make this article better for you?

What's missing?