Hello and thank you for trying out MigrateWP.
MigrateWP is a command line utility that lets you migrate a WordPress site from your macOS Local development environment to a linux server with a single command. It is open source software released by Tartan Web Design under the GPLv2 licence.
The documentation is designed to help you get set up and using MigrateWP as quickly as possible. If anything is unclear, please free post in the matrix.org user group where someone may be able to help.
The tool is aimed at developers so some prior knowledge of the command line is assumed.
To use MigrateWP you need
- MacOS running on your local machine
- Linux on a remote server
Prior to running migrateWP you should ensure the following is installed
- WP CLI 2.4.0
- Rsync 2.6.9
- SSH user
- WP CLI 2.4.0
- Rsync 2.6.9
Installation & Setup
Before beginning the setup please check you meet the system requirements and have the required dependencies installed on your systems.
Download latest release here:
Open terminal and cd into the folder containing migrate
Create an alias:
alias mwp="bash /Users/username/yourfolder/MigrateWP.sh"
echo "alias mwp="bash /Users/username/yourfolder/MigrateWP.sh" >> ~/.zsh
Then restart your terminal session
Each site in the config will look something like this
Replace ‘sitename’ with the name you want to use to reference your site
in ‘sshUser’, enter an SSH user with permissions over the folder which holds your WordPress installation.
If you are using Plesk, this will be the systemUser for the plesk webspace. (This user can be found at: subscriptions>sitename>Connection Info)
Finally, enter the file path to the wp-content folder on the local and remote servers
MigrateWP accesses the remote server numerous times and so it will be helpful to add a key to your SSH account.
The ssh guide assumes you are using Plesk as your server management platform and have the ‘SSH Keys manager’ extension installed. If you are using a different server management solution some steps may be slightly different & you should refer to their documentation.
If you are using Plesk, this can be done by
- Installing the ‘SSH Keys Manager’ Plesk extension
- Copying your local public SSH key
Pasting the public key into the Plesk SSH keys page for this website. The Plesk SSH keys page can be found at (subscriptions>sitename>SSH Keys)
- Setting ‘Access to the server over SSH’ to /bin/sh (subscriptions>sitename>Connection Info-> Manage access)
NB, you don’t need to set up separate ssh sub-domains, as on Plesk at least, the credentials are the same as the main domain.
MigrateWP has four commands, push, pull, rollback & report.
The push command migrates a site from your local machine to a remote server
mwp pull sitename
The pull command migrates a site from the remote server to your local machine
mwp push sitename
The rollback command allows you to undo the last push or pull
mwp rollback sitename
The report command displays the migration history for the site you specify
mwp report sitename