Migrate WordPress and other apps
ServerPilot can migrate WordPress and other apps between your servers as well as from any hosting provider that supports SSH access. Additionally, you can migrate between apps on the same server such as to create a staging environment or change an app’s name.
There is no size limit for migrated apps. You can migrate apps that are hundreds of gigabytes in size.
You can migrate an app’s files, databases, or both.
You can migrate to either an empty app or an app with existing content. When migrating to apps with existing content, you can choose whether existing files and database tables should be overwritten or skipped.
Overview
To migrate an app:
- If migrating to a new app, first create the new app on the destination server.
- In the Migrations dashboard, create a new migration that defines the content to migrate and the source and destination servers.
- Test the migration.
- Run the migration.
The following video shows how to migrate a WordPress app.
Prerequisites
To perform a migration, the destination app must be on one of your ServerPilot-managed servers.
If you are not migrating to an existing destination app, you must first create a new app on your destination server. If you are migrating a WordPress app, create the new app as a WordPress app.
If you are migrating from a source server that is not managed by ServerPilot, you will need an SSH username and password for the source server. This SSH user must have permissions to access the source app’s web root directory.
To migrate the database of a non-WordPress app, you will need to know the database name, username, and password for both the source and destination databases.
Get Started
- In the Migrations dashboard, click on Create migration job.
- Name your migration.
- For App type, select if this is a WordPress app or leave the selection empty for a non-WordPress app.
- Choose what content should be migrated. WordPress migrations should migrate the app’s files and the app’s database unless you have a specific use case for migrating only the files or the database.
- Select how to handle conflicts for existing content. Files and database tables that already exist on the destination server can either be overwritten or skipped by the migration. If migrating to a new destination app, choose Overwrite.
- Click Save & continue.
Source server
The options in this step will be different depending on whether the source server is managed by ServerPilot.
Option 1: Migrate from a ServerPilot-managed server
- For Source type, select Server managed by ServerPilot.
- For Source server, select the server that has the source app to be migrated.
- If you have customized your server to run SSH on a non-standard port, enter the port in the SSH port field, otherwise leave the port set to “22”.
- Select the app you would like to migrate.
- If you are migrating a database:
- For WordPress apps:
- Check the box to automatically read the database credentials
from the source app’s WordPress configuration (
wp-config.php).
- Check the box to automatically read the database credentials
from the source app’s WordPress configuration (
- For non-WordPress apps:
- Select the source database and enter the database user’s password.
- If your database isn’t hosted on the same server as your application, fill in Database host with the hostname or IP address of your database server.
- For WordPress apps:
- Click Save & continue
Option 2: Migrate from other hosting
- For Source type, select Other hosting.
- Enter either the hostname or IP address of the source server.
- If SSH is running on a non-standard port on the source server, enter the port in the SSH port field, otherwise leave it set to “22”.
- Enter the SSH username and password that can access the app on the source server.
- Enter the path to the site’s web root directory.
This can be an absolute path or a path relative to the user’s home directory.
- Absolute paths begin with
/, for example:/srv/users/USERNAME/apps/APPNAME/public//home/USERNAME/public_html
- Relative paths do not begin with
/, for example:apps/APPNAME/publicpublic_html
- Absolute paths begin with
- If you are migrating a database:
- For WordPress apps:
- Check the box to automatically read the database credentials
from the source app’s WordPress configuration (
wp-config.php).
- Check the box to automatically read the database credentials
from the source app’s WordPress configuration (
- For non-WordPress apps:
- Enter the name of the source database along with the database username and password.
- If the database isn’t hosted on the same server as the application, fill in Database host with the hostname or IP address of the database server.
- For WordPress apps:
- Click Save & continue
Destination server
- For Destination server, select the server that has the destination app where the content will be migrated to.
- Select the Destination app.
- If you are migrating a database:
- For WordPress apps:
- Check the box to automatically read the database credentials
from the destination app’s WordPress configuration (
wp-config.php).
- Check the box to automatically read the database credentials
from the destination app’s WordPress configuration (
- For non-WordPress apps:
- Enter the name of the destination database along with the database username and password.
- If the database isn’t hosted on the same server as the application, fill in Database host with the hostname or IP address of the database server.
- For WordPress apps:
- Click Save & continue
Test and run migration
- Click Run pre-migration tests
- After the tests have succeeded, click Run migration.
- Once the app’s migration has completed, you can make your app live (see below).
Make your migrated app live
Once the migration completes, configure your app’s domains and enable AutoSSL.
When you’re ready to make the migrated app live, update your domain’s DNS so the domain resolves to the destination server’s IP address.