Wondering how to Migrate WordPress to AWS lightsail? We can help you.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Service.
Let’s take a look at how our Support Team help a customer deal with this query.
How to Migrate WordPress to AWS lightsail?
Today, let us see the steps followed by our Support Techs for migration.
Step1: Create an Instance on LightSail
First login to AWS console, then go to services and click on AWS Lightsail.
On AWS Lightsail dashboard, first select instance location. I am choosing the Oregon location, as my targeted audience is the United States.
You can choose location according to your blog or website targeted audience.
Select Instance Location
After selecting instance location choose instance image platform, whether it is linux or windows. In my case I am choosing Linux.
Select Instance Platform
Select OS(Operating System) for Instance
Now, you need to select os or Apps + OS If you select Apps + OS, you can choose pre-installed applications such as WordPress, Magento, Joomla, Node.js, etc.
when you select only OS, you will be able to choose any operating system from the list, such as Ubuntu, Amazon Linux, Debian, CentOS, etc with different versions.
If you choose any raw OS(operating system), you have to set up a LAMP stack to host your website.
SSH key pair generate for server access
Now, you need to select the SSH key pair for accessing the Lightsail instance via command line.
You may select the default key pair, however it is recommend to create a new ssh key pair.
When you click on Create New, an alert box will show the SSH key pair region with the create button to continue.
After clicking on the Create button, you have to provide the SSH Key Pair name and click on generate key pair.
Your Lightsail instance SSH key pair is generated. Now click on the Download key to save the SSH key pair on your computer.
Below the SSH key pair field, you will find an option to enable automatic snapshot. You may select this option or ignore it.
Again, it is recommended to select an automatic snapshot for a rainy day.
Enable automatic Snapshot for Backup
If you enable automatic snapshot, you will bill separately for the snapshot service.
To enable automatic snapshot, you need to fix the time to trigger automatic snapshot. Choose your time accordingly.
Choose AWS Lightsail Instance Plan
Now, it’s time to choose an AWS Lightsail instance plan.
Depending upon your website estimated traffic and functionality of the website, choose an instance plan wisely.
There are different types of instance in terms of price, memory, processor, storage, etc.
After selecting the instance plan, now add instance name, add key only tags and add key only value tags.
You can leave this part also, it’s completely optional. Now, click on Create instance.
Hurray, your Lightsail instance is launched.
Step2: Instance Connect via SSH access
Connect your instance using SSH. You can connect to your Lightsail instance using two ways.
SSH using ssh client.
Connect using a browser-based SSH client
Connect using SSH client
If you are connecting from Ubuntu or Mac, you can connect using the terminal. When you try to SSH using a server key, you may get a server key bad permissions error. So, before connecting to the server, change the server key file permission.
To change the permission, use the following command.
$ sudo chmod 400 server_key.pem
Now, run the following command to connect the instance from the terminal.