MU-Migration: Error during import: db tables created but no site/files/plugin/theme
This is a pretty cool tool, and even with the error I ran into saved me tons of time, thanks!
I ran the following on my single site:
$ wp mu-migration export all site.zip --plugins --themes --uploads
Then moved the zip over to my new server where the multisite is set up and ran this:
$ wp mu-migration import all site.zip
It spit out a bunch of MySQL errors:
crop@themeofthecrop-ubuntu-2gb-nyc3-01:/var/www/demo.themeofthecrop.com/htdocs$ wp mu-migration import all ~/plateup-site.zip
Extracting zip package...
WordPress database error Table 'demo_themeofthecrop_com.wp_3_options' doesn't exist for query SELECT option_value FROM wp_3_options WHERE option_name = 'wp_3_user_roles' LIMIT 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, TenUp\MU_Migration\Commands\ImportCommand->all, TenUp\MU_Migration\Commands\ImportCommand->create_new_site, switch_to_blog, WP_Roles->reinit, get_option
WordPress database error Table 'demo_themeofthecrop_com.wp_3_options' doesn't exist for query SELECT option_value FROM wp_3_options WHERE option_name = 'blog_charset' LIMIT 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, TenUp\MU_Migration\Commands\ImportCommand->all, TenUp\MU_Migration\Commands\ImportCommand->create_new_site, sanitize_text_field, wp_check_invalid_utf8, get_option
WordPress database error Table 'demo_themeofthecrop_com.wp_3_options' doesn't exist for query SELECT option_value FROM wp_3_options WHERE option_name = 'blogname' LIMIT 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, TenUp\MU_Migration\Commands\ImportCommand->all, TenUp\MU_Migration\Commands\ImportCommand->create_new_site, install_blog, get_blogaddress_by_id, get_blog_details, get_option
WordPress database error Table 'demo_themeofthecrop_com.wp_3_options' doesn't exist for query SELECT option_value FROM wp_3_options WHERE option_name = 'siteurl' LIMIT 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, TenUp\MU_Migration\Commands\ImportCommand->all, TenUp\MU_Migration\Commands\ImportCommand->create_new_site, install_blog, get_blogaddress_by_id, get_blog_details, get_option
WordPress database error Table 'demo_themeofthecrop_com.wp_3_options' doesn't exist for query SELECT option_value FROM wp_3_options WHERE option_name = 'post_count' LIMIT 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, TenUp\MU_Migration\Commands\ImportCommand->all, TenUp\MU_Migration\Commands\ImportCommand->create_new_site, install_blog, get_blogaddress_by_id, get_blog_details, get_option
WordPress database error Table 'demo_themeofthecrop_com.wp_3_options' doesn't exist for query SELECT option_value FROM wp_3_options WHERE option_name = 'home' LIMIT 1 made by include('phar:///usr/local/bin/wp/php/boot-phar.php'), include('phar:///usr/local/bin/wp/php/wp-cli.php'), WP_CLI\Runner->start, WP_CLI\Runner->_run_command, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, TenUp\MU_Migration\Commands\ImportCommand->all, TenUp\MU_Migration\Commands\ImportCommand->create_new_site, install_blog, get_blogaddress_by_id, get_blog_details, get_option
Importing Users...
Importing tables...
Updating post_author...
Error: Invalid input file
crop@themeofthecrop-ubuntu-2gb-nyc3-01:/var/www/demo.themeofthecrop.com/htdocs$ ls
index.html wp-blog-header.php wp-load.php
index.php wp-comments-post.php wp-login.php
license.txt wp-config-sample.php wp-mail.php
mu-migration1461340848 wp-content wp-settings.php
readme.html wp-cron.php wp-signup.php
wp-activate.php wp-includes wp-trackback.php
wp-admin wp-links-opml.php xmlrpc.php
I may have made a mistake in that I didn’t re-map the domain name when I ran the import command. When I realized, I popped into the wp_blogs
table and updated the record there. The site then appeared in my list of sites, and from there it was fairly easy to run a wp search-replace
command to update the URLs properly.
However, none of my plugins, themes or files transferred over. I was able to work it all out by moving files from the mu-migration146134970848
directory it created in my wp root.
But I’m wondering if you have any idea what went wrong. I have two more sites to do in the coming weeks so would love to iron out any quirks with my setup if needed.
Thanks, this is a huge time saver for me!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 15 (8 by maintainers)
Thanks for the info @NateWr.
I know what went wrong and I’ll work to patch this either today or over the weekend. You had this problem because no user had been transferred over (because there’s also an admin user on your multisite install probably and thus no mapping table - the json file - had been created).