Wordpress with AWS Lightsail

Amazon Lightsail makes it really easy to host a private Wordpress blog for as little as $5 USD a month. It’s a one-click solution with a Wordpress container provided by Bitnami.

Amazon Lightsail Landingpage

That $5 USD gets you get 512 MB RAM, 1 vCPU and a 20 GB SSD. You also have access via SSH, a list of metrics, and snapshots to save your container. You can also use snapshots to create a new instance — neat!

The instances for AWS Lightsail Wordpress


In choosing your location, you should go with a region close to your customers. Then you can pick the image — in our case, Wordpress.

Choose the instance image “Wordpress”

This process takes a few minutes. When you’re done, you can open your shiny, new Wordpress blog at the given public IP.

The default look of your new Wordpress blog — we’ll deactivate the banner in the corner later.

You’ll also have a new Lightsail entry which allows you to stop or reboot the instance and create snapshots.

Get a static IP

You can get a static IP for your Wordpress, which you’ll need if you want to direct your domain(s) to your Wordpress blog when you’re done.

Connect to your Wordpress instance with SSH

You can use the “Connect using SSH” option to log in to your instance:

Connect using SSH with your browser

It will bring up a terminal in the browser:

The SSH terminal within your browser

You can connect from your terminal if you want to make things easier and enable copying/pasting code. You can use SSH on Mac/Linux — on Windows, you need a tool like Putty.

For an SSH connection from your computer, you’ll need to download a private SSH key via your Lightsail account page:

Copy it to a folder of your choice. If you try to connect at this point, you’ll probably get an error like this:

Permissions 0755 for ‘~/.ssh/LightsailDefaultPrivateKey-eu-central-1.pem’ are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key “~/.ssh/LightsailDefaultPrivateKey-eu-central-1.pem”: bad permissions
Permission denied (publickey).

The message is clear. You need to change the private key’s permissions:

sudo chmod 600 ~/.ssh/LightsailDefaultPrivateKey-eu-central-1.pem

After this step, you can log in to your new Wordpress Lightsail instance. Replace <your public IP> with your actual public IP:

> ssh bitnami@<your public IP> -i ~/.ssh/LightsailDefaultPrivateKey-eu-central-1.pem

Log in to your Wordpress admin

Log in to your instance with SSH and type in the following command to get your admin password:

cat bitnami_application_password

It will print out the admin password. You can then log in to your Wordpress with “user” as a user name and the newly-acquired password:

Login with “user” and your given password.

Immediately after logging in, you should go to your profile and change your username and password.

Disable the Bitnami banner

The Bitnami banner display in the bottom right corner of the page. If you click on the banner, you’ll be shown some information regarding your page setup:

Bitnami Information page for your new Wordpress instance

You can disable the banner (the page will still be available) like so:

sudo /opt/bitnami/apps/APPNAME/bnconfig --disable_banner 1
sudo /opt/bitnami/ctlscript.sh restart

Point your DNS to the static IP

Everything should be ready to go now. Here’s how you can add the IP to your domain:

Option 1: Add the IP to a different DNS server. 
You should create A type entries for www and the @. Here’s an example :

@ IN A <your public IP>
www IN <your public IP>

Option 2: Use Amazon as a DNS Server.
When doing this, you’ll need to add entries for your domain. Amazon will give you names of name servers, which you have to add to your domain registrar:

DNS Records for your IP using the sample domain “unterwegs-in-suedostasien.de”

As soon as the domains point to your Wordpress, you can go ahead and set up SSL — read more about this in my second article: “SSL for AWS Lightsail Wordpress”.

More resources in case you get stuck:

Thanks for your interest. Did I forget something important? Do you have a different opinion? I’m always glad to get feedback.

Follow me on Twitter for updates & more: @jensneuhaus — 🙌

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.