Migrate WordPress site from GoDaddy to AWS Lightsail

This is a blog post on how to manually migrate your WordPress site from GoDaddy to AWS Lightsail. There are a few plugins that make it easy to migrate WordPress sites, but most of them use SFTP with user/password credentials. Unfortunately, AWS Lightsail hosting doesn’t allow you to use SFTP user/password credentials, therefore I decide to write this blog post to help anyone out there trying to migrate from a GoDaddy hosted site to AWS Lightsail.

I’m assuming you already have a blank AWS Lightsail instance created. If yo have not created a new WordPress instance of AWS Lightsail, follow these steps before continuing.

Connect to GoDaddy MySQL Database

The first thing you want to do is connect to your GoDaddy instance of MySQL via phpMyAdmin, MySQL Workbench other another method. Since we’re using GoDaddy in this example I will go through the steps to connect via phpMyAdmin from the GoDaddy website. In the end you want to export your database as a single .sql file. If you already have the database export, skip this section.

  1. Log into GoDaddy, go to Products and connect to your phpMyAdmin site.
  2. Select your database on the left
  3. Select Export from tabs across the top of the window
  4. Select Custom and turn on:
    • Add DROP DATABASE
    • Add DROP TABLE/VIEW/PROCEDURE
    • Add CREATE TABLE
  5. You now should have a .sql file with a complete export of your MySQL database.

Connect to AWS MySQL Database via Workbench

  1. MySQL Workbench: Open MySQL Workbench
  2. Create New SSH Connection:
    • Click on the “+” icon to add a new connection.
    • Fill in the connection settings:
      • Connection Name: Enter a name for your connection.
      • Connection Method: Choose “Standard TCP/IP over SSH”.
      • SSH Hostname: Enter your Lightsail server’s IP address.
      • SSH Username: The username used for SSH (e.g., bitnami).
      • Download Lightsail SSH key: Follow these steps to download your SSH key. Save them to a location on your machinne.
      • SSH Key File: Browse and select your Lightsail SSH key file you just downloaded (LightsailDefaultKey-us-east-2.pem).
      • MySQL Hostname: Enter 127.0.0.1 (to connect through SSH).
      • MySQL Server Port: Leave as default (3306) unless changed.
      • Username: Your MySQL database username.
      • Optionally, click “Store in Vault” to save your MySQL password.
  3. Test and Connect:
    • Click “Test Connection” to ensure all settings are correct.
    • If the test is successful, click “OK” to save the connection.
    • Double-click on the saved connection to connect to your MySQL database.
  4. Run database script from GoDaddy:
    • Create a new query window inside this SSH connection
    • Open or drag-and-drop the .sql datbase export from GoDaddy.
    • Make sure the database names are the same between your AWS instance and the GoDaddy .sql file. Update as necessary to make sure urls and site settings match the new AWS instance.
    • Run the script

Connect to AWS Lightsail file system via FileZilla

  1. Download FileZilla: If you don’t have FileZilla, download and install it from the FileZilla website.
  2. Open FileZilla: Launch FileZilla on your computer.
  3. Gather AWS Lightsail Information:
    • Note your Lightsail instance’s public IP address.
    • Locate your SSH private key file (e.g., LightsailDefaultKey-us-east-2.pem).
  4. Convert SSH Key if Needed:
    • If your key is not in PPK format, use FileZilla’s key conversion feature:
      • Go to Edit > Settings > SFTP.
      • Click “Add key file”.
      • Browse to your key file and open it. FileZilla will prompt to convert it to PPK format. Click “Yes” and save the new PPK file.
  5. Set Up FileZilla Connection:
    • Click on File > Site Manager.
    • Click “New Site” and name it (e.g., AWS Lightsail).
    • Set the following:
      • Host: Your Lightsail instance’s public IP address.
      • Port: 22 (default for SSH).
      • Protocol: SFTP – SSH File Transfer Protocol.
      • Logon Type: Key file.
      • User: Your SSH username (e.g., ubuntu for Ubuntu servers and bitnami for AWS Linux servers).
      • Key file: Browse and select your PPK file you downloaded earlier.
  6. Connect to Lightsail Instance:
    • Click “Connect” to establish a connection.
    • If prompted, trust the host and confirm the connection.
  7. You should now be connected to your AWS Lightsail file system via FileZilla and can start transferring files.
  8. Locate WordPress Directory:
    • Once connected, you will see the remote site’s directories on the right side of FileZilla.
    • WordPress is typically installed in the /var/www/html directory or under a specific domain name in /var/www.
    • Navigate to the appropriate directory where WordPress is installed.

Locate Downloaded wp-content Folder from GoDaddy

  1. Connect to GoDaddy SFTP:
    • From FileZilla, set up a SFTP connection the same way you set up SFTP to AWS Lightsail, this time use user name and password. Alternatively, use FileManager from cPanel to package and download your WordPress directory from GoDaddy.
  2. Access Downloaded Folder on Local Machine:
    • On the left side of FileZilla, navigate to the local directory where you have the wp-content folder downloaded from GoDaddy.

Copy Folders to AWS Lightsail

  1. Locate wp-content in Lightsail WordPress Directory:
    • In the remote site (right side of FileZilla), navigate inside the WordPress directory to find the wp-content folder.
  2. Transfer Themes, Plugins, and Uploads:
    • On your local machine (left side), open the downloaded wp-content folder.
    • Find the themes, plugins, and uploads folders.
    • Select these folders, then right-click and choose “Upload”.
    • Confirm any prompts to overwrite files if you are updating existing folders in your AWS Lightsail WordPress installation.
  3. Monitor Transfer Progress:
    • The bottom section of FileZilla shows the progress of file transfer. Wait for the transfer to complete.

After completing these steps, your AWS Lightsail WordPress instance will have the themes, plugins, and uploads folders from your previous GoDaddy WordPress site. You may need to update the WordPress database and adjust settings within your WordPress admin panel to reflect the changes. Once your settings are complete you can navigate to your AWS Lightsail IP address to see your migrated site. The next step will be to update the DNS settings from pointing to the GoDaddy instance to your new AWS Lightsail IP address.

Feel free to contact us with any questions or if you find yourself in need of some help migrating from GoDaddy to AWS or any other hosting.

Leave a Reply

Your email address will not be published. Required fields are marked *