Quantcast
Channel: Topic Tag: MySQL | WordPress.org
Viewing all articles
Browse latest Browse all 5527

Pierre Dargham on "[Plugin: MultiSite Clone Duplicator] MySql database not attached.."

$
0
0

Hi there !

If you clone the primary site (the first one of your network, with id = 1, and SQL prefix = wp_), you need to use a filter in order to tell multisite-clone-duplicator which plugin-related tables need to be cloned.

For example, if you have those 2 extra tables you need to copy when duplicating :

wp_my_plugin_table_foo
wp_my_plugin_table_bar

Then you want to add something like this to your functions.php file :

function mucd_primary_table_to_copy($primary_tables) {
	$primary_tables[] = 'my_plugin_table_foo';
	$primary_tables[] = 'my_plugin_table_bar';;
	return $primary_tables;
}
add_filter('mucd_default_primary_tables_to_copy', 'mucd_primary_table_to_copy');

Does it solve your problem ?

More details in the FAQ :

Can I clone the primary site ?
Yes you can, but you want to be careful : WordPress saves network tables and primary blog tables with the same prefix, and some of their data are mixed. It forces us to restrict primary blog cloning to copy only the default wp tables. If you want to change this (for example, include your plugin tables in the cloning), use mucd_default_primary_tables_to_copy filter. In the future, you want probably not to copy again and again the primary blog : use a "template" blog dedicated to clonage instead.

Best regards,

Pierre


Viewing all articles
Browse latest Browse all 5527

Trending Articles