Running WordPress on Amazon Lightsail

I started this blog site on, using the free hosting option. That worked OK for a while, but then I discovered how difficult it can be to add formatted code samples to a blog post. I wanted to add samples like the one shown in this screenshot:

Just a small sample of a Maven POM file

Some Google searches turned up a solution: use a WordPress plugin.

Unfortunately, the free hosted sites do not allow one to install plugins. In order to do so, I would have to subscribe to their “Business” plan, for about $30 per month. That’s way too much to spend on my little hobby blog, so I had to look for other alternatives.

I found plenty of independent hosting services that will set up a WordPress instance for you, manage the server backups, etc. Then I happened upon a search result for WordPress hosting on Amazon Lightsail. This is how Amazon describes what Lightsail is:

Lightsail is designed to be the easiest way to launch and manage a virtual private server with AWS. Lightsail plans include everything you need to jumpstart your project – a virtual machine, SSD-based storage, data transfer, DNS management, and a static IP – for a low, predictable price.

Details, please…

If you already have an AWS account, then you should already have access to Amazon Lightsail. In the AWS Management Console, click “Services” and then look for Lightsail under the “Compute” options.


You’ll be launched into a new browser window/tab, with a layout that’s different from the AWS Management Console.


In the screenshot above, you can see the running instance of WordPress in my account that is powering this blog.

Creating a new WordPress instance

Look for the big orange “Create instance” button, and click it.

Click me!

Before a Lightsail server instance is created, you’ll need to choose from some options. The first one is your hosting region.

No Canadian hosting? Boooooooo!!!

I was going to choose the Central Canada zone, but it appears that Lightsail servers aren’t available in all the AWS regions. The Virginia region will be fine. You can also change the availability zone within the selected region if you wish.

Next, you need to choose the Lightsail instance type. The only choice (at the time I write this) for WordPress is on a Linux-based OS.


Any now my favorite part – the price!

First month free? I like free stuff…

The tiny instance plan is all I’m going to need for this hobby blog, and the price is right. I love that the first month is free. If I get in over my head with the setup, then I can just come back and delete the instance and not be out of pocket at all.

Instance settings

I’ve already created my instance (you’re reading a post on it right now), so instead of clicking “Create”, I’ll just go back to my Lightsail home page and show some of the features.


I’ll choose the “Manage” option for my WordPress instance first.


The top half of the instance details page just gives the highlights about the instance, but does provide handy Stop and Reboot buttons. Some of the setup instructions require an instance restart after you change something in the Linux terminal session. Clicking the Reboot button is easier than doing it from the command line.

The bottom half of the page is organized into sections. The “Connect” section comes first. I haven’t bothered to obscure the host username, because everyone who uses this image type will have “bitnami” as the username. The SSH session connects via a keypair, so knowing the username doesn’t really give anything away.

“Connect” section

The “Connect” section has a big orange button that you use to launch a browser-based SSH terminal session with the Linux host. I needed to use this to manually modify one configuration file, and run a couple of commands. In each case, the step-by-step instructions were provided. You’ll only need a basic working knowledge of Linux command line operations to get the job done. It also seems to be a one-time thing (at least so far…).

This is what the terminal session looks like

I’ll skip the “Storage” and “Metrics” sections because there isn’t anything too interesting in those, and I’ll move on to “Networking”.

“Networking” section

When you first create a new WordPress instance, it will not have a static IP address. You’ll need to click a button to attach a static IP. There is no extra cost to have a static IP, as long as your instance is always Online. AWS charges customers hourly for static IPs (also called Elastic IPs) that are reserved, but not attached to a running server instance. In the screenshot above, you can see that I have already attached as static IP to my instance. I needed a static IP before I could associate my “” domain with my WordPress instance, so the address would work. The procedure for associating your internet domain name with a static IP will vary, depending on your domain name registrar. I discuss how I did mine in this blog post.

The Firewall settings seen in the screenshot are the defaults. I haven’t had cause to change them so far.

The next section is “Snapshots”.

“Snapshots” section

I believe a “snapshot” is a copy of the host server image at a moment in time. I took a snapshot earlier today, and they aren’t quick. It appears that you can use a snapshot to start up another instance of WordPress on a separate host.

Cool feature, but not useful for me at the moment

I just wanted a backup in case I make a host configuration change that messes something up. The snapshot would give me a way to step back to a stable host setup. Note that a snapshot isn’t the same as backing up your WordPress blog content. That should be done from inside the WordPress application.

I’ll skip the “History” and “Delete” sections. “History” is just a log of events, like when you last restarted the instance. The “Delete” section is for deleting the entire instance forever.

Configuring the new instance

When a new WordPress instance is created, it starts with many configuration tasks left for you to address. I didn’t know if I would be successful in getting my instance set up the way I wanted, so unfortunately I didn’t take screenshots during the process. I do apologize.

Logging in for the first time

When a new instance is created, you’ll get something like this when you open a browser and go to the public IP address of the instance:


That little “Manage” icon in the bottom right corner is the key. If you click it, you’ll be navigated to a page with instructions on how to configure your WordPress instance. The first thing you should do is get access to the WordPress admin page and create a proper user for yourself. A fresh Lightsail instance is set up with only one user, named “user”, who is also the Administrator.

After you’ve done all the server configuration, you’ll want to get rid of that “Manage” icon as well. They also provide the instructions on how to do that.

Installing Plugins

You’ll likely want to install some plugins to support your blog, and those will depend on your particular needs. Putting those aside for now, there are some plugins that I think everyone should use.

Plugins are installed from the administrator page.




The Jetpack plugin allows you to integrate your privately hosted WordPress instance with your account. That alone makes it worth installing. It also does a bunch of other things. Just install it!



Once you install and configure this plugin, your WordPress instance will be able to send outgoing email. This is useful if you have your blog set up to alert you when there are comments to be moderated, etc. If you don’t set up something for outgoing email, then you won’t receive email alerts from your instance.

Migrating from to my new instance

As I mentioned at the start of this post, I originally started this blog on My hope was that it would be easy to export the existing blog site content and import it on my new server. It was possible to do just that, and it wasn’t too difficult to figure out.

Exporting from the old WordPress blog host

Start by going to and viewing the old site.


Then scroll down to the Configure options, and click “WP Admin”. This will launch the administrator interface in a new browser window/tab.


On the admin page, find the Tools options, and click Export under the list of tools.


Choose the free export option.


Leave the default “All Content”, and download the export to your computer.


Then save the export file somewhere. You’ll need it shortly when you re-import the content into the new WordPress instance.


Importing to the new WordPress blog host

Start by logging in to the administrator page on your Amazon Lightsail WordPress host. If you’ve forgotten the URL, you can just use the public IP address that’s shown in the Lightsail console.


You’ll need to append “wp-admin” to the IP address, such as:

If you have already associated a domain name with your site, then you can do this:

Enter your username and password to log in. On the administrator page, find the Tools option, and choose Import.


Then choose the WordPress importer.

Strange that WordPress doesn’t put their own importer at the top of the list. I guess they are serious about keeping things in alphabetical order!

Now you select the (.xml) Export file that you downloaded earlier from your old host, and import it here.


After the import, all your exported blog content should be available on the new host. You’ll likely want to change some of the settings on your new host to match the old one, such as the Theme, and other display-related settings.


Note that a fresh instance of Amazon Lightsail WordPress only has a few themes installed by default. It’s easy to install more via the adminstrator page. Just use the “Add New” button in the Theme section to install new themes on your server.


If you’ve made it this far, then you shouldn’t have too much trouble doing the rest of the setup and configuration of your new WordPress host. Good luck!


Leave a Reply