Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Site migration using All in One WP Migration and WP CLI

Do a backup

Install the plugin

wp plugin install all-in-one-wp-migration --activate

You must reload the page once before continuing

Do the backup

Adjust the settings for your own need, this here makes a backup of the database only. I suggest using rsync to sync media files.

wp ai1wm backup --exclude-media --exclude-themes --exclude-inactive-themes --exclude-muplugins --exclude-plugins --exclude-inactive-plugins --exclude-cache

Remove the plugin

wp plugin deactivate all-in-one-wp-migration --uninstall

Restore a backup

Go to backup directory or create if does not exist

cd wp-content/ai1wm-backups/

Download the backup

wget http://siteurl.fi/wp-content/ai1wm-backups/backup-20180105-142530-313.wpress

Install the plugin

wp plugin install all-in-one-wp-migration --activate

You must reload the page once before continuing

Restore the site from backup

wp ai1wm restore backup-20180105-142530-313.wpress

Not sure if necessary to flush permalinks twice, like when restoring from front end, but do it once or twice if you encounter problems.

wp rewrite flush

Remove the plugin and delete the backup file

wp plugin deactivate all-in-one-wp-migration --uninstall

rm backup-20180105-142530-313.wpress

Remember to remove the unneeded backup files from the source as well

@ramonfincken
Copy link

ramonfincken commented Dec 31, 2020

On the target site:

wp option update blog_public 0

along with any rm of files such as advanced-cache.php

@rguillermo
Copy link

rguillermo commented Feb 12, 2021

This currently require the 'unlimited' plugin, which is paid

@ramonfincken
Copy link

ramonfincken commented Feb 26, 2021

That is correct @rguillermo

@ThejusAP
Copy link

ThejusAP commented Jan 17, 2022

How to install the paid All in One plugin zip file version through WP CLI?

@ramonfincken
Copy link

ramonfincken commented Jan 17, 2022

you need to have a public ZIP location of which you can install it

@ThejusAP
Copy link

ThejusAP commented Jan 17, 2022

I am having the paid plugin .zip file with me, I have copied it to the root directory . Is it the same command as installing normal plugins?
eg. wp plugin install all-in-one-wp-paid.zip --activate

@ramonfincken
Copy link

ramonfincken commented Jan 17, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment