How to Migrate a Website Using InstaWP SSH Migration: A Step-by-Step Guide
SSH migration is a safe and quick way to move your website's files and database from one hosting environment to another. Advanced users and developers who need a reliable way to do large-scale migrations (More than 5GB in size) or keep downtime to a minimum will find this process very useful.
This document provides a step-by-step procedure for migrating a website using SSH. The process involves connecting to both the source and destination websites through terminal commands, generating a backup, and applying this backup to the new site. The goal is to ensure a seamless transition with minimal disruption to the website's functionality.
Access the settings of the source website and enable SSH.
Ensure SSH access is enabled for your source site before proceeding. Contact your hosting provider for guidance if needed.
Copy the provided SSH command, open the terminal, and paste it. Type 'yes' when prompted and enter the password to establish the connection.
Ensure the following commands are installed on your system to perform the migration actions smoothly:
wp: WP-CLI client for managing WordPress sites via the terminal.
scp: For securely transferring files between servers.
tar and zip: For compressing files.
mysqldump: Used by WP-CLI to export the database.
Note:
These commands are essential for executing the migration process. If any are missing, install them before starting.
Repeat the above process for the destination site. Enable SSH, copy the command, and connect using the terminal.
Navigate to the directory where WordPress files are located. Use the cd command to move into the relevant folder and the ls command to list its contents.
Directory structures may vary depending on your hosting setup. Double-check the location of your WordPress installation.
Visit the InstaWP GitHub page to copy the source server command. Paste it into the terminal to generate a backup.
Source Command:
curl -sSL https://github.com/InstaWP/ssh-migration/releases/download/latest/source.phar -o source.phar && php source.phar
Wait for the backup to complete. Note the backup ID provided at the end of the process.
The Backup ID generated during the process is valid for only 6 hours. Ensure you complete the migration within this time frame.
On the destination site, access the same directory again by us cd & ls command.
Paste the Destination Server command to process the migration. Enter the backup ID when prompted and confirm the action.
To download the destination server PHAR file, you can use the following command:
curl -sSL https://github.com/InstaWP/ssh-migration/releases/download/latest/dest.phar -o dest.phar && php dest.phar
Once done, verify the migration by refreshing the destination site and checking its functionality.
This document provides a step-by-step procedure for migrating a website using SSH. The process involves connecting to both the source and destination websites through terminal commands, generating a backup, and applying this backup to the new site. The goal is to ensure a seamless transition with minimal disruption to the website's functionality.
Step 1
Access the settings of the source website and enable SSH.
Ensure SSH access is enabled for your source site before proceeding. Contact your hosting provider for guidance if needed.
Step 2
Copy the provided SSH command, open the terminal, and paste it. Type 'yes' when prompted and enter the password to establish the connection.
Ensure the following commands are installed on your system to perform the migration actions smoothly:
wp: WP-CLI client for managing WordPress sites via the terminal.
scp: For securely transferring files between servers.
tar and zip: For compressing files.
mysqldump: Used by WP-CLI to export the database.
Note:
These commands are essential for executing the migration process. If any are missing, install them before starting.
Step 3
Repeat the above process for the destination site. Enable SSH, copy the command, and connect using the terminal.
Step 4
Navigate to the directory where WordPress files are located. Use the cd command to move into the relevant folder and the ls command to list its contents.
Directory structures may vary depending on your hosting setup. Double-check the location of your WordPress installation.
Step 5
Visit the InstaWP GitHub page to copy the source server command. Paste it into the terminal to generate a backup.
Source Command:
curl -sSL https://github.com/InstaWP/ssh-migration/releases/download/latest/source.phar -o source.phar && php source.phar
Step 6
Wait for the backup to complete. Note the backup ID provided at the end of the process.
The Backup ID generated during the process is valid for only 6 hours. Ensure you complete the migration within this time frame.
Step 7
On the destination site, access the same directory again by us cd & ls command.
Step 8
Paste the Destination Server command to process the migration. Enter the backup ID when prompted and confirm the action.
To download the destination server PHAR file, you can use the following command:
curl -sSL https://github.com/InstaWP/ssh-migration/releases/download/latest/dest.phar -o dest.phar && php dest.phar
Step 9
Once done, verify the migration by refreshing the destination site and checking its functionality.
Updated on: 02/01/2025
Thank you!