A shared plugin update goes through on the main site. You load the front page, submit a test form, and everything works. Then a subsite throws a fatal error, or the plugin's admin menu vanishes, or the logs stay empty.
The cause is usually one of three things: the PHP version that subsite actually runs, the plugin's activation scope, or settings that live per site. This guide shows how to audit all three in a few minutes, before you hit Update on the network.
The starting point is a troubleshooting write-up on CF7 API integrations breaking on multisite. Its three suspects (activation scope, per-site configuration, PHP drift) make a sensible checklist. Several of its claims need checking first, though.
Step 1: Separate what you can verify from what you should not assume
The write-up makes three claims that this guide has not verified: that WordPress checks only the main site's PHP version before a plugin update, that Contact Form 7 6.2 requires PHP 8.3, and that the CF7 API connector's changelog lists multisite fixes. Check each one against the primary docs before you repeat it to a client.
For the first, read the WordPress developer documentation on the "Requires PHP" plugin header. For the second and third, read the plugin's readme, changelog and "Requires PHP" line on its wordpress.org page.
Practical inference (not confirmed by the write-up): WordPress can only compare a plugin's declared minimum against the PHP process handling the admin request you are using. In multisite, you run updates from one network admin domain. If another domain runs a different PHP handler, core has no view of it. Whatever the docs say about the exact check, don't count on it to protect subsites running different PHP versions.
Step 2: Record the PHP version each subsite serves over the web
The only reliable way to learn a subsite's web PHP version is to run PHP code inside a web request to that subsite and write down what it sees. The mu-plugin below does that. It stores PHP_VERSION, the SAPI name and the site URL in a per-site option. It then lists every site on a Network Admin page, along with the target plugin's activation scope and its declared "Requires PHP" value.
Status: unexecuted. No one has run this code on a live network. Test it on staging first.
Dependencies and versions:
WordPress multisite is required. The code uses get_sites(), which core added in WordPress 4.6 (confirm in the developer reference). The syntax uses ??, so PHP 7.0 or later is needed to load the file. The target plugin slug is set in one constant. Change it for your connector.
Save this as wp-content/mu-plugins/network-php-audit.php:
<?php
/**
* Plugin Name: Network PHP Audit
* Description: Records web PHP version per subsite and lists it in Network Admin.
*/
defined( 'ABSPATH' ) || exit;
const NPA_TARGET_PLUGIN = 'contact-form-7/wp-contact-form-7.php';
// Record what the web request sees. Skip CLI so WP-CLI never overwrites it.
add_action( 'init', function () {
if ( PHP_SAPI === 'cli' ) {
return;
}
$saved = get_option( 'npa_web_php' );
if ( is_array( $saved ) && $saved['php'] === PHP_VERSION && $saved['sapi'] === PHP_SAPI ) {
return; // Unchanged, avoid a write on every request.
}
update_option( 'npa_web_php', array(
'php' => PHP_VERSION,
'sapi' => PHP_SAPI,
'url' => home_url(),
'seen' => gmdate( 'c' ),
), false );
} ); See [read about ansible touch always changed: make the file task idempotent](/ansible-touch-always-changed-make-the-file-task-idempotent) for additional background.
add_action( 'network_admin_menu', function () {
add_menu_page( 'PHP Audit', 'PHP Audit', 'manage_network_options', 'npa-audit', 'npa_render_page', 'dashicons-search', 99 );
} );
function npa_render_page() {
if ( ! current_user_can( 'manage_network_options' ) ) {
wp_die( 'Not allowed.' );
}
if ( ! function_exists( 'get_plugin_data' ) ) {
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}
$file = WP_PLUGIN_DIR . '/' . NPA_TARGET_PLUGIN;
$data = file_exists( $file ) ? get_plugin_data( $file, false, false ) : array();
$requires = $data['RequiresPHP'] ?? '';
$network = is_plugin_active_for_network( NPA_TARGET_PLUGIN );
echo '<div class="wrap"><h1>Web PHP audit</h1>';
echo '<p>Plugin: ' . esc_html( NPA_TARGET_PLUGIN ) . ' | Installed version: ' . esc_html( $data['Version'] ?? 'not found' ) . ' | Requires PHP: ' . esc_html( $requires ?: 'not declared' ) . '</p>';
echo '<table class="widefat striped"><thead><tr><th>Site</th><th>Web PHP</th><th>SAPI</th><th>Scope</th><th>Status</th></tr></thead><tbody>';
foreach ( get_sites( array( 'number' => 500 ) ) as $site ) {
switch_to_blog( $site->blog_id );
$rec = get_option( 'npa_web_php' );
$active = in_array( NPA_TARGET_PLUGIN, (array) get_option( 'active_plugins', array() ), true );
$url = home_url();
restore_current_blog();
$scope = $network ? 'Network' : ( $active ? 'This site only' : 'Inactive' );
if ( ! is_array( $rec ) ) {
$status = 'NOT SEEN YET';
$php = $sapi = '-';
} else {
$php = $rec['php'];
$sapi = $rec['sapi'];
$status = ( $requires && version_compare( $php, $requires, '<' ) ) ? 'TOO OLD' : 'OK';
}
printf( '<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>', esc_html( $url ), esc_html( $php ), esc_html( $sapi ), esc_html( $scope ), esc_html( $status ) );
}
echo '</tbody></table></div>';
}
Expected output (illustrative values, not from a real run):
The Network Admin sidebar gains a "PHP Audit" item. The table lists one row per site. For example: https://main.example.com | 8.3.x | fpm-fcgi | Network | OK and https://shop.example.com | 8.2.x | fpm-fcgi | Network | TOO OLD, assuming the plugin header declares a minimum of 8.3.
Verification step:
A site records its PHP version only when a web request reaches it, so request each site to fill the table. Hit wp-login.php, because full-page caches often skip PHP on the home page. For more on this, see full coverage of voice agent latency budget: where a turn's 1,000 ms goes.
for url in $(wp site list --field=url); do
curl -s -o /dev/null -w "%{http_code} $url\n" "${url}wp-login.php"
done
Reload the Network Admin page. Every site should now show a PHP version. Cross-check one row against your control panel's PHP setting for that domain.
Failure case:
If a row still says NOT SEEN YET after the loop, the request never ran PHP for that site. Look for a cache or CDN rule serving wp-login.php, a redirect to another domain, or a mapped domain that resolves to a different server. That is a finding too. If a row says TOO OLD, hold off on the plugin update until you change that domain's PHP version.
Step 3: Use WP-CLI for activation and settings, but not for PHP
WP-CLI is the quickest way to list sites and plugin status. Don't trust its PHP version. The CLI uses whatever php binary your shell finds, with its own php.ini. Plesk and cPanel assign per-domain PHP versions to the web handler (FPM, LSAPI, or similar), and those settings don't change the CLI binary. Run wp --info to see which binary and version the CLI uses, then compare that to Step 2.
wp --info | grep -i "php binary\|php version"
wp site list --fields=blog_id,url --format=table
for url in $(wp site list --field=url); do
echo "== $url"
wp --url="$url" plugin get contact-form-7 --fields=name,status,version
done
This snippet is also unexecuted. A status of active-network means network-activated. active means enabled on that site only, and inactive means that site does not load it. Swap in your connector's slug. If a site is already throwing a fatal error, add --skip-plugins to the command.
Step 4: Confirm per-site settings exist
The write-up says each site stores plugin settings separately and that network activation does not copy them. That matches how WordPress stores per-blog options and tables, but whether your connector uses options, custom tables or posts is something to confirm in its code or docs. Contact Form 7 forms themselves are posts, so they live in each site's own tables.
Also read: context: check installed openjdk versions on linux after java4shell
for url in $(wp site list --field=url); do
echo "== $url"
wp --url="$url" post list --post_type=wpcf7_contact_form --format=count
wp --url="$url" db tables --scope=blog
done
Compare the table lists across sites. A subsite that is missing the connector's tables, or shows zero forms, has not been configured, so a main-site integration will not fire there.
Step 5: Run the pre-update checklist
Work through this on staging, or with a backup in hand.
| Check | How | Pass condition |
|---|---|---|
| Plugin's declared PHP minimum | Network Admin PHP Audit header, plus the plugin's readme | You know the number |
| Web PHP per subsite | PHP Audit table after the curl loop | No TOO OLD or NOT SEEN YET rows |
| Activation scope | wp plugin get per URL | Status matches what you intend |
| Per-site settings | Form count and tables per URL | Every site that needs the integration has its own config |
| debug.log | Check wp-content/debug.log after a test request on each subsite | No fatal errors or version messages |
After the update, repeat the curl loop and a real form submission on each subsite, then read debug.log again.
What to expect next
Most audits end one of two ways: a domain stuck on an older PHP handler, or a subsite that was never configured. Fix the PHP version in the hosting panel and rerun the table, or build that site's integration from scratch. If everything passes and a subsite still misbehaves, look at REST routes and permalinks next. The write-up also recommends flushing permalinks for 404s on the CF7 endpoint.



