You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For Wordpress-Multisites with "Matomo for WordPress", each site has a different database table prefix (like wp_matomo_, wp_2_matomo_, ...).
For each table wp_X_matomo_site, there is one single entry (therefore Matomo's idsite is always 1 for each multisite site)
Therefore it is not possible to migrate other than the main site of the multisite, because idsite 2 etc. is not found.
A quick-and-dirty workaround is, to replace the database table prefix, for example with an additional parameter in Commands/Migrate.php:configure():
$this->addRequiredValueOption('source-wpsite', null, 'Source Multisite Site ID you want to migrate');
Warning: Keep in mind, that this snippet is for demonstration only. The table-prefix might not be "wp_", because it is configurable as well. Also it might be the optimal place and/or way to fix that behavior, as I'm currently not too familiar with Matomo's codebase
The text was updated successfully, but these errors were encountered:
For Wordpress-Multisites with "Matomo for WordPress", each site has a different database table prefix (like wp_matomo_, wp_2_matomo_, ...).
For each table wp_X_matomo_site, there is one single entry (therefore Matomo's idsite is always 1 for each multisite site)
Therefore it is not possible to migrate other than the main site of the multisite, because idsite 2 etc. is not found.
A quick-and-dirty workaround is, to replace the database table prefix, for example with an additional parameter in Commands/Migrate.php:configure():
and add in Commands/Migrate.php:doExecute():
Warning: Keep in mind, that this snippet is for demonstration only. The table-prefix might not be "wp_", because it is configurable as well. Also it might be the optimal place and/or way to fix that behavior, as I'm currently not too familiar with Matomo's codebase
The text was updated successfully, but these errors were encountered: