This WP-CLI plugin makes the process of moving sites from single WordPress sites to a Multisite instance (or vice-versa) much easier. It exports everything into a zip package which can be used to automatically import it within the desired Multisite installation.
MIT License
329
stars
47
forks
source link
Consider adding `--blog_url` or `--blog_name` as an alternate to `--blog_id` #38
One issue that I have is that my local multisite blog_id is out of sync with my remote multisite blog_id. It would be much easier to reference the site slug (which is the same in both) instead of the ID which will required an extra call.
blog_id="$(site_url=http://example.test/sitename/; wp site list | awk -v site_url=$site_url '{ if( $2 == site_url ) print $1; }')";
echo $blog_id;
For example:
$ wp mu-migration export all subsite.zip --blog_url=http://example.test/sitename/
$ wp mu-migration export all subsite.zip --blog_name=sitename
One issue that I have is that my local multisite
blog_id
is out of sync with my remote multisiteblog_id
. It would be much easier to reference the site slug (which is the same in both) instead of the ID which will required an extra call.For example: