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

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.1.4 is now available. This release contains an important compatibility fix for WordPress 4.5 to allow correct detection of the taxonomy term editing screen. Without this fix, any custom fields you have attached to custom taxonomies will not be shown at all in the editing form. Note also that MasterPress will still detect the edit screen correctly in…