Multisite Support in MasterPress

Note: this information currently applies to the latest beta release of version 1.0.1 of MasterPress. Version 1.0 only supports the “Shared Mode” for multisite.

MasterPress completely supports the WordPress multisite feature first introduced in WordPress 3.0.  Also, MasterPress has the capacity to support a multisite environment in two very different ways, depending on the needs of your setup:

  • Isolated Mode (default): Each site in your network will maintain its own masterplan. That is, the setup of post types, taxonomies, roles, field sets, and fields will be unique to each site in the network. An example of this setup would be when maintaining a network of sites for multiple clients, where you do not want owners of each site to be able to see any of the other sites. That is, you’re using multisite more as a means to streamline the installation and maintenance of WordPress itself for multiple sites.
  • Shared Mode: All sites in your network have the capacity to share various attributes of the masterplan. An example of this setup would be a multisite network for multiple versions of the same site (perhaps for multiple languages), where you want each of those sites to be able to use the same post types, taxonomies, fields, and so on.

Network Activation

MasterPress also supports network activation, which allows the plug-in to be enabled / disabled for every site (and every new site) in the Multisite network. Note that activating via network activation has no bearing on the default sharing mode – it is always isolated mode by default, unless you configure MasterPress to run in shared mode.

Isolated Mode in detail

When operating in isolated mode, which is the default mode as of version 1.0.1, the masterplan setup of each site in the network will essentially behave as if you are running the site on a standard non-multisite WordPress site installation.

One thing to note, however, is that if you will still be able to expose data in other sites in the network through the use of functions and methods which issue site queries, such as the WOOF::sites method. If you need to create pages that display info about all the sites in a network, it’s up to you to make use of something like roles and capabilities to ensure that only administrative users can see this info. Similarly, the Related Site Field Type will also show all of the sites in a network, so take care with that too.

Database and content storage in isolated mode

When running in isolated mode, MasterPress will create a whole set of separate database tables prefixed with site IDs, the same way that WordPress will do this for posts and terms tables. This is really the key mechanism that allows these sites to easily run in isolation.

File and folder storage for MasterPress content (image / file uploads, icons, caches, etc) behaves in a similar way – each site will store its own copies of these folders and files within the uploads folder for each site. In typical multisite setups these folders are usually:

  • WordPress 3.5 and above: wp-content/uploads/mp for the main site, and wp-content/uploads/sites/{blog_id}/mp for every other site
  • WordPress 3.4 and below (including 3.5+ sites upgraded from 3.4 and below): wp-content/blogs.dir/{blog_id}/mp

Shared Mode in detail

As mentioned above, shared mode allows the masterplan for a site to be shared right across the network, so that every site in the network potentially has access to the same custom post types, taxonomies, user roles, field sets, and fields. Enabling shared mode is easy – simply add the following line to your wp-config.php file at the root of your WordPress site:

If you wish to run in shared mode, it’s advisable to add this configuration line before you activate MasterPress to avoid redundant database tables and content files being created.

Database and content storage in shared mode

When running in the shared multisite mode, MasterPress will create one set of database tables to store the masterplan information, with the same table prefix as the standard tables in the main WordPress site.

File and folder storage for MasterPress content is partially shared – specifically, the extensions, masterplans, menu-icons, mp-cache, and tmp folders will all be shared in the uploads directory for the main site, but the file-from-url, files, image-cache, and image-from-url folders will be stored in the uploads area for each site (refer to the isolated mode details above for specific storage locations).

Controlling access to Masterplan objects with Availability panels

When creating and editing post types, taxonomies, field sets and fields in shared multisite mode, MasterPress includes the ability to further specify which sites in the network can see these objects through Availability panels. By default, these are configured to show the objects across all sites, but you can change this to either include the objects for specific sites, or exclude the objects for specific sites (which is useful if you want an all sites except for type of setup). Figure 1 below shows the three modes of this panel:

Figure 1: Multisite Availability Panel Modes

Latest From the Blog

MasterPress 1.4.1 is now available

27th May 2024

This update addresses backwards compatibility issues that were introduced in the previous update. There were some edge cases where PHP 7 had issues and it didn’t work at all on PHP 5.6. We have now changed it so that the PHP 8 compatibility changes will now only affect PHP 8 and will be more thorough… 

Plugin Requirements

MasterPress requires a minimum of WordPress version 4.9, MySQL 5.6, and PHP version 5.6.20.

We also recommend that PHP is configured to use a memory limit of 64MB per request (128MB may be required for sites with higher complexity).

This plug-in is not compatible with the hosted service.

Three AM