Migrate your WordPress blog to Lightsail
Looking to change your WordPress hosting provider? Amazon Lightsail is the easiest way to run a WordPress site on AWS.
You can choose one of our pricing plans (starting at $5 USD per month) and have full control over your WordPress installation, including plugins, themes, and more.
Creating a Lightsail WordPress instance only takes a few minutes. Follow this tutorial to back up your existing WordPress blog and import it to a new instance running in Lightsail.
Here's a quick overview of the process:
Continue reading to get started.
Prerequisites
Before you begin, you'll need the following:
-
You'll need to an AWS account. Sign up for AWS
, or sign in to AWS if you already have an account. -
Make sure your account is set up to use Lightsail. If it has been a while since you created your account, or if you haven't provided a credit card yet, you may need to log in to the AWS Management Console and update your account first.
Step 1: Back up your existing WordPress blog
You can use WordPress to back up your existing blog. You'll just need to be able to log into the WordPress admin console and manage your blog.
-
Navigate to your blog, and then choose Manage.
If the Manage banner is not shown, you can reach the sign in page by browsing to
http://
. Replace<PublicIP>
/wp-login.php
with the public IP address of your instance.<PublicIP>
-
Enter your user name and password to log into the WordPress admin console.
-
On the WordPress Dashboard, choose Tools, and then choose Export.
-
On the Export page, choose All content to export everything as an XML file.
-
Choose Download export file to download your old blog as an XML file.
Save the XML file in a location that's easy to find. You'll need it in Step 4.
Step 2: Create a new WordPress instance in Lightsail
You can create a new WordPress instance in Lightsail in just a few minutes. Here's how:
-
Go to the Lightsail home page
and log in. -
Choose Create instance.
-
Select the AWS Region where you'd like to create your blog.
You can choose the default Availability Zone or change that once you select an AWS Region.
-
Select WordPress.
-
Choose your instance plan (or bundle).
You can upgrade your Lightsail plan later if needed. For more information, see Create an instance from a snapshot in Lightsail.
-
Enter a name for your instance.
Resource names:
-
Must be unique within each AWS Region in your Lightsail account.
-
Must contain 2–255 characters.
-
Must start and end with an alphanumeric character.
-
Can include alphanumeric characters, periods, dashes, and underscores.
-
-
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.
Note
For more information about key-only and key-value tags, see Tags.
-
-
Choose Create instance.
Step 3: Log into your new Lightsail WordPress blog
Now that you have a new blog in Lightsail, you'll need to access the WordPress Dashboard to import your old blog data. The default password to sign in to the administration dashboard of your WordPress website is stored on the instance. Complete the following steps to get the password.
To get the default password for the WordPress administrator
-
Open the instance management page for your WordPress instance.
-
On the WordPress panel, choose Retrieve default password. This expands Access default password at the bottom of the page.
-
Choose Launch CloudShell. This opens a panel at the bottom of the page.
-
Choose Copy and then paste the contents into the CloudShell window. You can either put your cursor at the CloudShell prompt and press Ctrl+V, or you can right-click to open the menu and then choose Paste.
-
Make a note of the password displayed in the CloudShell window. You need this to sign in to the administration dashboard of your WordPress website.
Now that you have the password for the administration dashboard of your WordPress website, you can sign in. In the administration dashboard, you can change your user password, install plugins, change the theme of your website, and more.
Complete the following steps to sign in to the administration dashboard of your WordPress website.
To sign in to the administration dashboard
-
Open the instance management page for your WordPress instance.
-
On the WordPress panel, choose Access WordPress Admin.
-
On the Access your WordPress Admin Dashboard panel, under Use public IP address, choose the link with this format:
http://
public-ipv4-address
./wp-admin -
For Username or Email Address, enter
user
. -
For Password, enter the password obtained in the previous step.
-
Choose Log in.
You are now signed in to the administration dashboard of your WordPress website where you can perform administrative actions. For more information about administering your WordPress website, see the WordPress Codex
in the WordPress documentation.
Step 4: Import your XML file into your new Lightsail blog
Once you have successfully logged into the WordPress Dashboard on your new Lightsail instance, follow these steps to import the XML file into your new Lightsail blog.
-
From the WordPress Dashboard on your new Lightsail instance, choose Tools.
-
Choose Import, and then choose Install Now to install the WordPress import tool.
-
Once the tool is done installing, choose Run Importer to run the import tool.
-
On the Import WordPress page, choose Browse.
-
Find the XML file you saved in Step 1: Back up your existing WordPress blog, and then choose Open.
-
Choose Upload file and import.
Accept the rest of the defaults, and then choose Submit.
Next steps
You can verify that everything worked by choosing your blog (next to the Home icon), and then choosing Visit Site from the WordPress dashboard. You can also type the IP address into a browser and view the blog.
Here are some next steps:
-
Migrate your DNS so that your domain name servers point to the new version of your blog.
-
Customize your new blog's appearance and/or install some WordPress plugins.