This is not really a "multisite" case, as it's really just the one site content with a single database.
What you could do is detect when the subsite hostname is being used, probably by matching $_SERVER['HTTP_HOST']
in a must-use
plugin... (if you don't create the subsites explicitly, your domain setup would need to allow "wildcard" subdomains.)
So that for each subdomain match, you can filter the active_plugins
and stylesheet
options via the option_{$key}
filters which are used in get_option
when the site is loading... eg.
add_filter('option_active_plugins', 'get_subsite_active_plugins');
function check_subsite_active_plugins($plugins) {
if (strpos($_SERVER['HTTP_HOST'], '1.site.com') === 0) {
$plugins = array('hello-dolly.php');
}
return $plugins;
}
However, you need to remember that if any changes are made to the database by a plugin or theme on any of the sites, it will affect all the sites. It some cases this might cause instability, but it is really hard to say depending on the plugins/themes.
Note there are some solutions out there already for using multiple themes, but nothing I know of specifically for having different plugin configurations like this.
Be aware also, there may be SEO ramifications to having "duplicate" content across subdomains, but there may be some way around that.