启用WordPress多站点后插件标签消失,子站点仪表盘无法显示求助
Hey there, let's work through this frustrating multisite issue you're dealing with—subdomains working but missing plugin tabs and broken subsite dashboards are common headaches, but we can nail down the fix step by step.
1. Double-Check Your wp-config.php Multisite Constants
First, make sure your multisite configuration in wp-config.php is 100% correct for subdomain mode. A tiny typo here can break critical admin functionality:
define('WP_ALLOW_MULTISITE', true); define('MULTISITE', true); define('SUBDOMAIN_INSTALL', true); define('DOMAIN_CURRENT_SITE', 'your-main-domain.com'); // No http/https here! define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
- Ensure
DOMAIN_CURRENT_SITEuses your bare domain (no protocol) and matches the primary site's domain exactly. - Remove any leftover single-site constants (like
define('WP_HOME', ...)ordefine('WP_SITEURL', ...)) that might conflict.
2. Verify Your .htaccess Rules
Subdomain multisite requires specific rewrite rules—if your .htaccess is misconfigured, it can block access to admin menus. Replace your current rules with this standard subdomain multisite setup:
RewriteEngine On RewriteRule ^index\.php$ - [L] # Add trailing slash to wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ $1 [L] RewriteRule . index.php [L]
- Set
.htaccesspermissions to644so your web server can read it. - If you're using Nginx, swap the Apache rules for this Nginx config snippet (adjust paths and PHP version as needed):
server { listen 80; server_name *.your-main-domain.com; root /path/to/your/wordpress/install; index index.php; location / { try_files $uri $uri/ /index.php?$args; } location ~ \.php$ { include fastcgi_params; fastcgi_pass unix:/run/php/php8.1-fpm.sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param PATH_INFO $fastcgi_path_info; } }
3. Isolate Plugin/Theme Conflicts
Since you can't access the plugin tab in wp-admin, use these workarounds to test for conflicts:
- Disable all network-active plugins: Use WP-CLI (if available) with this command:
If the plugin tab returns, reactivate plugins one by one to find the culprit.wp plugin deactivate --all --network - Test with a default theme: Rename your active theme folder (via FTP or file manager) to force WordPress to use a default theme like Twenty Twenty-Four. This rules out theme-related dashboard breaks.
4. Reset Permalinks & Clear Caches
Multisite often gets tripped up by outdated rewrite rules or cached data:
- Log into your network admin dashboard (not a subsite).
- Go to Settings > Permalinks and click "Save Changes"—no need to edit anything, just save to refresh rewrite rules.
- Clear all caches: Browser cache, server/CDN cache, and any WordPress cache plugins you might have active.
5. Fix Site URL Mismatches
Incorrect site URLs can break subsite dashboards even if subdomains load:
- Go to your network admin dashboard > Sites > All Sites.
- Hover over a broken subsite and click "Edit".
- Check that both the Site Address (URL) and Home fields use the correct subdomain (e.g.,
https://sub.your-main-domain.com). - Save changes and repeat for all affected subsites.
6. Repair the WordPress Database
Corrupted database entries can cause admin menu and dashboard issues. Use WP-CLI to run a repair:
wp db repair
Or, if you don't have WP-CLI access, add this line to wp-config.php temporarily, load your site once, then remove it:
define('WP_ALLOW_REPAIR', true);
Start with the simplest checks first—verifying config files and resetting permalinks often fix these multisite glitches. If none of these steps work, let me know and we can dig deeper into server logs or advanced debugging.
内容的提问来源于stack exchange,提问作者Hamza Iftikhar

