Background

Prime Mover 1.4.1 is a major update that took over nearly a month to complete 🙂 This is an important release because it added new multisite features and several bug fixes. These are one of the most requested features by Prime Mover users.

Change log

= 1.4.1 =

  • Feature: Added support for multisites that don’t use main site as blog ID 1.
  • Feature: Added support for multisites that uses different DOMAIN_CURRENT_SITE site from the main site.
  • Fixed: Restore hang on user import due to overwritten administrator caps.
  • Fixed: Issue on search and replace related to domain name.
  • Usability: Refactored main plugin file for code readability.

Support for multisite main site ID not equal to 1

WordPress supports multisites with main site not equal to 1. This is made possible by simply changing some multisite constants in the wp-config.php. For example:

define('DOMAIN_CURRENT_SITE', 'storefront.subdomaintest.staging');

define('BLOG_ID_CURRENT_SITE', 3);

In this case – the multisite has a new main site with subdomain:storefront.subdomaintest.staging

And this main site has a main site blog ID of 3 and the network admin is also accessible at this domain also.

Multisite configuration like this is not supported with the old versions and you cannot install or properly run Prime Mover plugin. This is now working fine starting version 1.4.1.

Support for multisite with different DOMAIN_CURRENT_SITE

In this case, the main site blog ID is still 1. However the multisite network admin is now accessible with a different DOMAIN_CURRENT_SITE. In default multisite, the main site domain is the same as the DOMAIN_CURRENT_SITE. So you can access network admin URL by accessing the main site URL and appending /network/ in the wp-admin.

Prime Mover old versions will return an error if this is installed. Now with version 1.4.1 onwards – this is now supported.

What about PRO versions – does it work with these?

There is no difference with the way the PRO version is handled before and after. However take note that if your multisite uses main site with blog ID not equal to 1. You cannot export or restore using FREE version because the main site export/import support is a PRO feature.

There were several PRO customers affected with these lack of support in the old versions – we ended up refunding them since Prime Mover does not work with this kind of setup before. If you have custom multisites that fits this description – make sure you upgrade to version 1.4.1 now 🙂

If you are using FREE version with custom multisites – no worries. You can still use the FREE version just like any standard multisite.

Bug fix – lost administrator privileges during restore

This is one of the bug reported by our user. The issue is that WordPress relies on user meta key named as PREFIX_capabilities. For example if your WordPress db prefix is wp_

The capabilities key is wp_capabilities. However – say for example the site is multisite and this site has this user meta key. But the prefix of that site is different – let’s say xx_capabilities. WordPress looks for this when checking for capabilities and not wp_capabilities

What happens when this site is migrated to single site? When this is migrated to single site the old site wp_capabilities will overwrite the current target site capabilities. When this capability is non-administrator – it can break the restore since it requires administrator. This bug is now fixed with Prime Mover 1.4.1.

Search and replace improvement – domain name search

Prime Mover does automatic search and replace during the restore process. However there are some issues with old version for example, this replaceable is previously allowed:

search: olddomain.test

replace: newdomain.test

This will introduce problems like as follows:

  • Email address in content (or anywhere in the database) will be changed unintentionally. For example test@olddomain.test will now become test@newdomain.test. During migration – mostly these emails are never changed.
  • Anything that uses this domain name inside the database will be affected – e.g. hosting accounts commonly used domain name in paths – might get broken.

The solution is to append scheme on the replaceable so that it will purely replace domain URLs.

search: https://olddomain.test

replace: https://newdomain.test

Refactoring – cleanup some code

The main plugin file is also simplified and clean up. It’s getting cluttered and harder to maintain in the previous release. Now it’s clean – the constants have been moved to a dedicated file as well as the global functions.

The unit tests is also improved and clean up as well.

Suggestions? Bug?

Please let us know by contacting us. We are so happy to hear it. Thanks!

Emerson Maningo Announcements