❌ ERR_CONNECTION_RESET when trying to access a WordPress website

The most common cause for ERR_CONNECTION_RESET error on a WordPress based website is usually because of some PHP file generating too much messages in the error log, which causes PHP engine to crash and return this type of error in the browser.

ERR_CONNECTION_RESET error on a WordPress website
A screenshot of Google Chrome browser which returns ERR_CONNECTION_RESET error.

Solution:

First thing you should do to try to bring the site back as soon as possible is to temporarily disable the PHP error logging in the WordPress configuration file and WordPress plugins that relate to the error logging and restart the PHP service afterwards (if possible).

1) Check if the wp-config.php file in the root of your WordPress installation directory contains a line define(‘WP_DEBUG’, true); and change it to define(‘WP_DEBUG’, false);

2) In the same file try to add or replace the error_reporting function and instruct it to turn off all PHP errors:
error_reporting(0);

3) If you use the “Query Monitor” plugin in your WordPress installation, navigate to the wp-content/plugins folder and rename the query-monitor directory to .query-monitor (add a dot in front of it). This will disable it, therefore avoiding any overrides for error output and logging.

If that does help, then you are most probably are facing some errors or incompatability issues in some of your plugins, theme files or individual PHP scripts.

In any outcome check the PHP related log files for any probable cause. It could very well be that you are using an incompatible PHP version with your WordPress installation or its plugin / theme files and you need to either update them or the other way would be to downgrade the PHP version to a bit older one.

A common error which gets logged into PHP error log because of this:

FastCGI: too much stderr received from server /path-to-instance/phpXX-fpm”, increase FCGI_SERVER_MAX_STDERR_LINE_LEN

ERR_CONNECTION_RESET with WPML plugin active

This is also a known scenario – when trying to access a website with WPML enabled, it gives ERR_CONNECTION_RESET error and site does not load. When WPML is disabled, the website loads normally. Disabling other plugins and enabling the default theme does not help. Changing the WordPress or PHP memory settings also does not help.

Solution:

Try to delete a “wpml_notices” key from “wp_options” table in the database which is used by your WordPress installation.

About the author
I'm a full-stack WordPress developer with a 10+ years of solid experience in the core web development languages, development processes / techniques, web security, Linux server management and with pretty good understanding about proper semantics, UX/UI, technical SEO, good design and basic knowledge of company leadership. On top of that - a distant 5+ years experience as a computer and electronics repair technician which often enables me to understand also how the things work at the hardware level.