As a WordPress user, you may occasionally encounter frustrating error messages like “connection timed out.” This occurs when you reach the limit of your server resources and memory usage, but the error doesn’t clearly indicate that your server cannot handle additional executions. Fortunately, there are several straightforward solutions to help you fix this error. Below, we outline five practical methods to resolve WordPress connection timeouts:
The first step in resolving this issue is to extend the maximum execution time. To do this, locate your php.ini
file. You can find it in the root directory (e.g., /cPanel
) under file manager
→ php.ini
. Once you’ve found it, open the file, locate maxexecutiontime
, and update it to 300
. Save the changes, refresh your website, and observe if the error persists.
One common cause of connection timeouts is plugin incompatibility. When you have numerous plugins—especially those that make frequent PHP requests to the server—it can overload the system. To troubleshoot, deactivate all plugins via your WordPress dashboard. Refresh your site afterward. If the error is gone, it’s likely a problematic plugin causing the issue. Deactivate unnecessary plugins, and if you need certain ones occasionally, keep them deactivated until needed.
Web hosting servers come with limited memory, and once you hit this limit, executions are restricted, leading to connection timeouts. To increase PHP memory, you’ll need to add this code to your wp-config.php
file:
define('WP_MEMORY_LIMIT', '64M');
If your hosting provider doesn’t permit this adjustment, contact them to request additional memory for your site.
A poorly-coded or resource-intensive theme can also cause connection timeouts by sending too many server requests. A quick solution is to switch to a default WordPress theme or another lightweight one. If your site functions normally after changing the theme, your original theme may have been the culprit.
In cases where your server hosts multiple websites, file compression might help alleviate the issue. Compress your HTML and text files to reduce requests sent from browsers to the server, which can significantly ease the load.