无法访问WordPress后台面板:PC端报错ERR_INVALID_CHUNKED_ENCODING移动端正常求助
Hey there, let's dig into this frustrating issue—when your WordPress admin loads fine on mobile but throws ERR_INVALID_CHUNKED_ENCODING on desktop, it's almost always tied to browser-specific interference or server-side output handling glitches. Here's a step-by-step breakdown to get you sorted:
1. Rule Out Browser-Specific Issues First
Since mobile works, your server is likely serving content correctly for most clients. Let's eliminate desktop browser quirks first:
- Clear browser cache & cookies: For Chrome, hit
Ctrl+Shift+Delete(Windows) orCmd+Shift+Delete(Mac), select "Cached images and files" and "Cookies and other site data", then clear. - Use incognito/private mode: This disables extensions and cached data. If the admin loads here, you know a browser extension or stale cache is the culprit.
- Disable all extensions: Head to your browser's extension manager, turn everything off, then reload the admin. Re-enable extensions one by one to pinpoint the problematic one.
2. Check Local Network Settings
Sometimes desktop network configurations mess with chunked encoding:
- Turn off VPN/proxy: VPNs or proxy servers can interfere with how your browser receives chunked data. Disable them and try accessing the admin again.
- Switch networks: Connect to a different WiFi or use your phone's hotspot. If the admin loads now, your home/office network has a filtering issue (like a firewall blocking certain encoding methods).
3. Troubleshoot WordPress Core, Plugins & Themes
Even if mobile works, desktop might trigger code paths that cause output errors:
- Disable plugins via FTP/File Manager: Access your site files, rename the
wp-content/pluginsfolder toplugins_old. This disables all plugins. If the admin loads now, rename the folder back and re-enable plugins one by one to find the faulty one. - Switch to a default theme: Rename your active theme folder (in
wp-content/themes) to something likemy-theme_old. WordPress will automatically switch to a default theme (e.g., Twenty Twenty-Four). If this fixes it, your theme has code that's breaking chunked encoding. - Tweak output buffering in wp-config.php: Add this line to your
wp-config.phpfile (right above/* That's all, stop editing! Happy publishing. */):
This ensures proper output buffering, which can fix chunked encoding errors caused by premature output from plugins or themes.ini_set('output_buffering', 'on');
4. Server-Side Checks (Contact Your Host if Needed)
If the above steps don't work, the issue is likely on your server:
- Ask your host to check error logs: PHP or server error logs will reveal if there's a problem with chunked encoding configuration—like misconfigured gzip/deflate settings in Apache/Nginx, or PHP scripts aborting mid-output.
- Verify PHP settings: Ensure
output_bufferingis enabled in your PHP config, and that there are no conflicting settings (likezlib.output_compressioncausing double compression). - Check CGI/FastCGI issues: Some server setups using CGI/FastCGI have chunked encoding bugs. Your host can switch to a different handler (like PHP-FPM) if needed.
Start with the browser and network checks—they're quick and often fix the issue. If you hit a wall with server stuff, don't hesitate to reach out to your hosting support with the error code and details about mobile working but desktop failing.
内容的提问来源于stack exchange,提问作者Naveen Kala

