WordPress CLI nad WP-All-In-One-Migration

Had problems running WP-All-in-One-Migration using the UI so I decided to test the wp command line interface that it supports.

Installation:

cd /tmo
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
# I'm in a docker container so sudo isn't used
mv wp-cli.phar /usr/local/bin/wp

ai1wm commands:

wp ai1wm --allow-root list-backups

wp ai1wm --allow-root backup
chown www-data:www-data <>.wpress
# download the file from the ai1wm UI in Wordpress

# login to the server where the content should be imported
# upload the file in the ai1wm UI in Wordpress
wp ai1wm --allow-root restore <file>.wpress

Resources