Skip to content
Welcome To Charanjit Cheema Blog

Welcome To Charanjit Cheema Blog

An Open Source and Cloud Blog

Menu
  • Home
  • About Me!
  • Way to my Technical Blog
  • Contact me
  • Privacy Policy
Menu

How to migrate existing WordPress blog from AWS EC2 instance to Amazon Lightsail

Posted on May 29, 2023May 29, 2023 by Charanjit Cheema

In my previous post I had written on how to convert AWS EC2 On Demand (OD) instance to Reserve Instance (RI) for running dedicated and heavy traffic based website like blog or any ecommerce website which require high configuration, but if your website does not have much traffic or you do not want high compute and storage configuration then using AWS OD or RI instance will not be benefited you. In such case instead of using AWS OD or RI instance for hosting your small website like WordPress blog you can choose Amazon Lightsail as it is an ideal for basic resource usage instance in terms of low cost.

I got an opportunity to get my hands dirty by using Amazon LightSail instance for running and migrating my this WordPress blog from my old AWS EC2 t2.micro instance. The big reason for making plans for migrating my old WordPress blog to this new WordPress blog hosted on Amazon Lightsail instance is cost factor and old AWS EC2 instance Linux OS Ubuntu 14 and WordPress version 5 were also became obsolete.

The Amazon Lightsail instance which I am using for hosting this new WordPress blog has basic configuration such as 512 MB RAM, 20 GB of SSD, 1 vCPU and Linux OS is Debian 11 this instance is costing me $3.50 per month which is much cheaper if I compared with my earlier WordPress blog which had same configuration hosted on AWS EC2 t2.micro instance, only instance price was $0.0052 per hour or approx. $3.38 per month excluding SSD and data transfer cost. If you go with a similar SSD, data transfer rate and other configuration with AWS t2.micro instance it would cost you approx. $5 to $6 per month.

In a nutshell If I define the Amazon Lightsail, it is a Virtual Private Server or VPS which is packaged with compute, storage, networking and DNS. It also allows you to create additional storage (disk or S3 bucket), database, containers, static IP, CDNs, Snapshots etc.

In this blog I will only explain how I provisioned my new Amazon Lightsail instance and migrated my old WordPress blog to this new WordPress blog.

 

Provisioning of Amazon Lightsail instance

  • Access Amazon Lightsail by accessing below link:

https://lightsail.aws.amazon.com

  • Under Instances tab click on Create Instance button

  • Under Instance location page select AWS Region and Availability Zone (AZ) or keep it default if you are fine with existing Region and AZ
  • Select OS Platform in my case I had chosen Linux/Unix
  • Under Select a Blueprint choose Apps+OS and select WordPress

  • Choose your desired instance plan as per your requirement. As I only wanted to host WordPress blog, so I had chosen cheaper one which is $3.5 plan with basic configuration

  • Provide your Amazon Lightsail instance desired name and then click on “Create instance” button

  • In few minutes your Amazon Lightsail instance will be ready and will be visible under instances tab. Now to access its console you need to click on the small command terminal icon which would be visible on left side of running instance.

  • After clicking on the command terminal icon, you will be presented with your lightsail console screen.

  • For security reasons I applied the latest patches and rebooted it. This below step is not mandatory, but it is recommended that whenever you provision your new instance always apply latest security patches, even periodically as well.

 

Creating and attaching static IP with Lightsail instance

For migrating and hosting new WordPress blog it is necessary to create static IP so that later it can be updated with existing DNS record. In my case I released my previous EC2 t2.micro Elastic IP for saving cost and updated it in AWS Route 53 DNS record with lightsail static IP as Amazon Lightsail provide 5 free static IP addresses but you need to be cautious during the migration that do not release the Elastic IP till then you migrate your existing WordPress blog to newly provisioned WordPress Lightsail instance otherwise it will be difficult to access the existing WordPress admin console.

In below steps I will guide you how I created and attached static IP with my new WordPress Lightsail instance and in later section I will guide you how I updated this newly created static IP with exiting DNS record:

  • Access the Lightsail below link:

https://lightsail.aws.amazon.com

  • Click on the Networking tab and click on “Create Static IP” button.

  • Under Create and attach a static IP provide desired name for identifying static IP resource.
  • Once the name is provided click on “Create and attach” button for attaching the static IP resource with Amazon Lightsail instance. You will be presented with a confirmation message.

 

  • Now under Networking you can see the static IP which is associated or attached with your new WordPress Lightsail   instance

 

Updating Static IP with existing WordPress site AWS Route 53 DNS record

In this section I will guide you how I updated newly created Static IP (procedure mentioned in previous section) with existing AWS Route 53 DNS record:

  • Access the AWS Route 53 page by clicking below link:

https://us-east-1.console.aws.amazon.com/route53/v2/home#Dashboard

  • Click on Hosted Zone under DNS Management.

 

  • Under the Hosted Zone click on your registered domain name.

  • Select “A” record in front of your domain name and under Record details click on edit record button which is visible in left side bar.
  • At left side bar you will get option for updating the Static IP address or A record under value box so update the newly created Static IP there and click on Save button.

  • Once done give some time to AWS Route 53 for repointing your existing domain to updated new Static IP in its DNS record and Global DNS record as well.

 

Migration of existing WordPress to newly provisioned WordPress Lightsail instance

  • Access your existing WordPress admin console with below IP address:

http://<PublicIP>/wp-login.php

Note: Replace the <publicIP> with your existing AWS EC2 instance Elastic IP address or Public IP Address.

  • Click on Tools > Export
  • Under “Choose what to export” select All content and then click on button “Download Export File “. This will export all your existing WordPress blog content in xml backup file in your local system.

  • Now access your newly provisioned WordPress Lightsail admin console with the same method by providing its StaticIP.
  • Provide the login username as “user” for login to new WordPress admin console. To get the default user password you need to connect with newly provisioned lightsail instance console
  • Run the below command in your lightsail instance console for getting the default user id password.

  • Once you login with default user name and password in new WordPress admin console, go to Tools>Import and then under Import install the WordPress as this import tool which will help us in importing existing WordPress blog content.

  • Once import tool installed successfully click on Run importer for importing the content

  • Next page will allow you with option to browse the downloaded exported xml file based content and then Click on button “Upload file and import”.

  • Once content is uploaded and imported it will present the screen with the list of your imported contents with All done message.

Voilà! Your existing WordPress Blog content is successfully migrated to newly provisioned WordPress lightsail instance and ready to serve. You can now access your newly provisioned Amazon Lightsail instance with your existing domain name.

Loading

  • Author
  • Recent Posts
Charanjit Cheema
Follow him
Charanjit Cheema
Charanjit is currently working as a Cloud Architect at Mphasis, with 17 years of experience in IT infrastructure projects, implementation, and support. While his main role is as a DevOps engineer, he holds a Cloud Architect position and has strong skills in cloud technologies and automation. His expertise includes Terraform, Ansible, AWS, Azure DevOps, Azure Cloud, VMware, and Linux systems.

Charanjit is passionate about automating tasks and improving processes. He uses tools like Terraform and Azure DevOps to build and manage cloud infrastructure and streamline deployment. He also enjoys using Shell scripts and Ansible playbooks to make systems run more efficiently.

In his free time, Charanjit enjoys learning about new technologies and sharing his knowledge through his blog. When he’s not working, he likes listening to music, having a cup of coffee, and relaxing in nature.

You can connect with Charanjit on Twitter, Facebook, LinkedIn, or email him at charanjit.cheema@cjcheema.com.
Charanjit Cheema
Follow him
Latest posts by Charanjit Cheema (see all)
  • How to optimize the performance of Ansible Automation Platform or Ansible Tower - July 16, 2023
  • How to fix code and text file linting errors with the help of Visual Studio Code - June 27, 2023
  • How to migrate existing WordPress blog from AWS EC2 instance to Amazon Lightsail - May 29, 2023

Like this:

Like Loading...

Related

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Tags

AWS Cloud Computing Dockers Networking Open Networking OpenSource RHEL-CentOS SDN Server Hardware SLES tcpdump Ubuntu WSL

Follow me @

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 2 other subscribers

Recent Posts

  • How to Deploy Docker Containers with NGINX on AWS EC2 Using Ansible and GitHub Actions
  • No More DynamoDB! Use Native S3 locking for Terraform State
  • How to Bring and Manage Manually Created AWS Resources Under Terraform Management
  • Iterating Cloud Resource Provisioning Using Terraform Count and For_Each Meta-Arguments
  • Terraform and Ansible Collaboration for AWS Cloud Deployment

Recent Comments

  1. Charanjit Singh on Terraform and Ansible Collaboration for AWS Cloud Deployment
  2. christinatodd2020aeaa798563 on Terraform and Ansible Collaboration for AWS Cloud Deployment
  3. Charanjit Singh on How to Set password policy in CentOS or RHEL system
  4. SAURABH on How to recover or rebuild initramfs in CentOS 7 Linux
  5. Sangita on How to Set password policy in CentOS or RHEL system

Archives

  • April 2025
  • February 2025
  • January 2025
  • August 2024
  • July 2024
  • June 2024
  • January 2024
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • September 2022
  • August 2022
  • July 2020
  • May 2020
  • February 2020
  • November 2019
  • June 2019
  • May 2019
  • March 2019
  • February 2019
  • December 2018
  • November 2018
  • October 2018
  • September 2018
  • August 2018
  • June 2018
  • May 2018
  • April 2018

Categories

  • Automation
  • Cloud Computing
  • Coding
  • CyberSecurity
  • Networking
  • OpenSource
  • RHEL-CentOS
  • Server Hardware
  • SLES
  • Technical Blog
  • Ubuntu
  • WSL

Blog Stats

  • 18,353 hits
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy
  • Home
  • About Me!
  • Way to my Technical Blog
  • Contact me
  • Privacy Policy
© 2025 Welcome To Charanjit Cheema Blog | Powered by Superbs Personal Blog theme
 

Loading Comments...
 

    %d