DEV Community

Rahul Sharma
Rahul Sharma

Posted on

CF7 API Integration Breaking on Multisite: A Complete Troubleshooting Guide

You have a WordPress multisite network. The "Contact Form to Any API" plugin works perfectly on your main site. Forms submit. API requests fire. Data reaches your CRM.

But on a subsite, something breaks. The form submits, but no API request appears in the logs. Or the plugin's admin menu does not appear at all. Or the request fires but uses the wrong configuration.

Multisite introduces a layer of complexity that single-site installations do not have. Plugin activation scope, configuration inheritance, and PHP version drift across subsites can all cause API integrations to fail in ways that are difficult to diagnose.

This guide walks through the exact reasons multisite integrations break and how to fix them.

Why Multisite Breaks API Integrations

WordPress multisite networks share a single codebase and database across multiple sites. Plugins are installed once, but activation and configuration can vary per site or across the network.

For the "Contact Form to Any API" plugin, this creates three specific failure modes:

Activation scope. If the plugin is network-activated, it is available on all sites. If it is activated only on the main site, subsites cannot access it. The plugin's own changelog includes entries for "Fix – Multi-site installation error" and "Fix – Multisite installation bug fix and update," confirming that multisite activation has been a recurring issue.

Configuration inheritance. Each site in the network has its own database tables for plugin settings. If you configure an API integration on the main site, that configuration does not automatically propagate to subsites. Each subsite needs its own integration setup.

PHP version drift. This is the most insidious cause. On a multisite network, plugins are installed once and shared by every site. WordPress checks the PHP version of the main site before allowing an update. If the main site runs PHP 8.3 and a subsite runs PHP 8.2, the plugin update proceeds, but the subsite loads the updated files and may produce a fatal error.

If no request appears in the plugin's logs at all on a subsite, the problem may be earlier in the pipeline. For a deeper breakdown of that scenario, see this guide on Contact Form 7 data not reaching the API.

Failure #1: The Plugin Is Not Activated on the Subsite

What you see: The "CF7 to Any API" menu does not appear in the subsite's WordPress admin. Forms submit, but no API integration settings are available.

Why it happens: Multisite has two activation modes: network activation and per-site activation. If the plugin was activated only on the main site, subsites do not see it. Even if it is network-activated, some plugins require per-site configuration to function correctly on each subsite.

A WordPress support thread about a similar CF7-related plugin described exactly this: the plugin was activated on the network but did not appear in the subsite's dashboard. The recommended solution was to enable "Network Activate" for the plugin.

The fix:

Step 1: In the WordPress Network Admin dashboard, navigate to Plugins.

Step 2: Locate "Contact Form to Any API." Check if it shows "Network Active" or just "Active."

Step 3: If it is not network-activated, click "Network Activate." This makes the plugin available on all subsites.

Step 4: Navigate to each subsite's admin dashboard and verify that the "CF7 to Any API" menu appears. If it does, you need to configure the integration settings separately on each subsite.

Important: Network activation does not copy settings from the main site to subsites. Each subsite has its own integration configuration stored in its own database tables.

For a deeper dive into API authentication errors and how they appear in logs, read this guide on Contact Form 7 API authentication errors.

Failure #2: The Integration Is Configured on the Main Site but Not on the Subsite

What you see: The form submits on the subsite. The plugin's menu appears. But no API request fires, or the request uses the wrong endpoint.

Why it happens: Multisite does not share plugin settings across sites by default. If you configured an API integration on main.example.com, the subsite sub.example.com has no knowledge of that configuration. It needs its own integration setup with its own endpoint URL, headers, and field mappings.

The fix:

Step 1: On the subsite's admin dashboard, navigate to "CF7 to Any API" and create a new integration.

Step 2: Configure the endpoint URL, authentication headers, and JSON payload separately for the subsite. You cannot reuse the main site's configuration.

Step 3: If you have many subsites with identical configurations, consider using a plugin like "Multisite Plugin Manager" to streamline the setup, or write a small script to programmatically copy settings across sites.

Alternative approach: If the API integration should be identical across all subsites, you can use a shared configuration stored in a custom database table or a network option. This requires custom development but avoids maintaining separate configurations for each site.

Failure #3: PHP Version Mismatch Across Subsites

What you see: The plugin's admin menu appears on the subsite, but form submissions fail. The browser console may show a 500 error or a 404 on the CF7 REST API endpoint. The plugin's logs are empty.

Why it happens: This is specific to multisite and became more common after Contact Form 7 version 6.2 required PHP 8.3. On a multisite network, plugins are installed once and shared. WordPress checks the PHP version of the main site before allowing updates. If the main site runs PHP 8.3 and a subsite runs PHP 8.2, the update proceeds. The subsite then loads the updated plugin files, which require PHP 8.3, and produces a fatal error.

A real-world case documented this exact scenario: a client network updated CF7 to 6.2 on a main site running PHP 8.3, but subdomains were configured on the server to run older PHP versions. The subsites loaded the same 6.2 files and produced fatal errors. Setting the subdomains to PHP 8.3 fixed it.

The fix:

Step 1: In your hosting control panel (Plesk, cPanel, or similar), check the PHP version assigned to each domain and subdomain in the network. Do not assume they match.

Step 2: Set all subdomains to the same PHP version as the main site. For Contact Form 7 6.2 and later, this must be PHP 8.3 or higher.

Step 3: After aligning PHP versions, test a form submission on each subsite.

Step 4: Check the subsite's wp-content/debug.log file for fatal errors. If the log shows a PHP version error, the fix has not been applied correctly.

For a comprehensive breakdown of authentication errors and how they interact with server configuration, see this guide on Contact Form 7 API authentication errors.

Failure #4: The Subsite's REST API Endpoint Is Broken

What you see: The form submits, but the AJAX spinner spins forever. The browser console shows a 404 error on /wp-json/contact-form-7/v1/contact-forms/[id]/feedback.

Why it happens: Multisite can break CF7's REST API endpoints. The endpoint URL may resolve to the wrong site or the wrong path. A WordPress support thread documented this exact issue: "Im getting the same error on multisite: /wp-json/contact-form-7/v1/contact-forms/61789/refill 404 because its looking in the wrong directory for the plugin jQuery."

The fix:

Step 1: In the subsite's admin, navigate to Settings → Permalinks. Click "Save Changes" without making any changes. This flushes the rewrite rules and regenerates the REST API endpoints.

Step 2: Check if the form submits correctly. If it still fails, navigate to the subsite's CF7 form editor and re-save the form. This can refresh the form's REST API registration.

Step 3: If the problem persists, deactivate and reactivate the "Contact Form to Any API" plugin on the subsite. This forces WordPress to re-register the plugin's hooks and REST routes.

The Debugging Checklist for Multisite Failures

Step Action What It Reveals
1 Check plugin activation scope Is it Network Active or per-site Active?
2 Verify the plugin menu appears on the subsite Is the plugin available to the subsite?
3 Check integration settings on the subsite Is the endpoint URL and payload configured?
4 Check PHP version for each subdomain Do all sites run the same PHP version?
5 Check wp-content/debug.log on the subsite Are there fatal errors?
6 Flush permalinks on the subsite Is the REST API endpoint working?
7 Check the plugin's API Logs on the subsite Was a request sent? What response code?

Beyond Multisite: One Form, Multiple Destinations

Once your multisite integration works, you might want to send the same submission to other tools: a CRM, an email marketing platform, or a help desk system.

A good connector plugin supports multiple API integrations from a single form submission. You can create a CRM contact, send an SMS via Twilio, and create a Zendesk ticket, all from one CF7 submission. For a cost comparison, see this article on Zapier vs a dedicated API plugin.

Key Takeaways

Multisite does not share plugin settings across sites. Each subsite needs its own integration configuration, even if the settings are identical to the main site.

Network activation is required for subsites to access the plugin. If the plugin is only activated on the main site, subsites cannot use it.

PHP version drift across subdomains is a silent killer. A plugin update that works on the main site can break subsites running older PHP versions. Check every subdomain, not just the main domain.

REST API endpoints can break on subsites. Flushing permalinks or re-saving the form often fixes this.

The plugin's changelog confirms multisite bugs have existed. Entries for "Multi-site installation error" and "Multisite installation bug fix" indicate that this has been a recurring issue. Always use the latest version.

With network activation, per-site configuration, consistent PHP versions, and flushed permalinks, your CF7 API integrations will work reliably across every site in your multisite network.

Top comments (0)