Free & open source · GPLv2
Migrate WordPress without leaving the command line
MigrateWP pushes, pulls and rolls back your WordPress sites between a macOS Local environment and a Linux server — with a single terminal command.
macOS local · Linux remote · rsync and WP-CLI under the hood
$ mwp push mysite
#######################################
# Starting Pre-Migration Checks #
#######################################
mysite.local running.
Local directory found.
SSH access verified.
Remote directory found.
Backing up remote site files.
Backup complete: ./wp-content_bak
Backing up remote site database
#######################################
# Starting Migration #
#######################################
sending incremental file list
wp-content/uploads/2021/09/hero.jpg
wp-content/themes/mysite/style.css
Success: Made 34 replacements.
#######################################
# Migration Complete #
#######################################
Why use MigrateWP?
MigrateWP was built for WordPress developers who are comfortable working on the command line. It is most useful for freelancers and agencies who manage multiple WordPress sites.
It’s fast
MigrateWP only transfers files that have changed, reducing the time it takes to migrate a site by as much as 95%.
It’s effortless
Migrate your WordPress sites without logging in to them. Open the terminal, run a single command. That’s it.
It’s robust
Rollback lets you undo a migration if something goes wrong. Search and replace runs through WP-CLI, so array serialisation is handled correctly.
It’s collaborative
The changelog records every migration to and from a remote site, giving teams visibility and reducing the chance of conflicts.
Four commands. That’s the whole interface.
Every command takes the site name you gave it in migratewp.conf.
mwp push sitename
Push
Migrates a site from your local machine to the remote server. The remote files and database are backed up first.
mwp pull sitename
Pull
Migrates a site from the remote server to your local machine, backing up your local copy before it starts.
mwp rollback sitename
Rollback
Undoes the last push or pull, restoring the files and database from the backup taken at migration time.
mwp report sitename
Report
Prints the migration history for a site, so the whole team can see who moved what, and when.
Up and running in three steps
No plugin to install, nothing to add to the WordPress site itself.
1. Download it
Grab the latest release and cd into the folder that holds it.
# from the release folder
$ ls
migratewp.sh migratewp.conf2. Alias it
Add an alias so mwp works from anywhere.
$ echo 'alias mwp="bash ~/mwp/migratewp.sh"' >> ~/.zshrc
$ exec zsh3. Configure it
Describe each site once in migratewp.conf, then migrate it forever.
$ mwp push mysiteGet MigrateWP
Free, open source, and about 1,000 lines of Bash you can read end to end before you trust it with a production site.