How to Fix the "Connection Timed Out" Error in WordPress
If you encounter a timeout error or ERR_CONNECTION_TIMED_OUT when opening your WordPress website, it means that the site took too long to respond. Browsers typically expect a response within 30 seconds. If this exceeds the allowed time, the browser terminates the connection.
This issue is common in WordPress and can be caused by various factors, including:
The server is not responding or taking too long to respond.
Issues within your WordPress website, such as resource limitations, plugin conflicts, or theme-related problems.
Before troubleshooting, ensure that your server is operational. If the server is running fine, follow these methods to resolve the "Connection Timed Out" error in WordPress.
1. Increase PHP Memory Limit
WordPress websites using resource-intensive themes or plugins may exceed the PHP memory limit, leading to a timeout error. Increasing this limit can often resolve the issue. Ensure the new value does not exceed the maximum memory allocated to your hosting plan.
Modify wp-config.php
Open the wp-config.php file using File Manager or FTP.
Add the following line before: define('WP_MEMORY_LIMIT', '128M');
Replace 128M with the maximum available memory for your WeWP hosting plan.
Save the file and refresh your website.
2. Increase Maximum Execution Time
The maximum execution time defines how long a PHP script can run before the server stops it. The default value is usually 30 seconds. If a script takes longer, it may result in a timeout error.
To increase the execution time to 120 seconds:
Open the php.ini file using SFTP.
To go to php.ini file, login SFTP and then go the your specific PHP version and go to this specific location - cd /etc/php/(your_PHP_version)/fpm and open the php.ini using vi php.ini
Add the following line above the max_execution_time 120 .
Now, then restart the service like sudo service php(your_PHP_version)-fpm restart
Save the file and refresh your website to check if the issue is resolved.
3. Temporarily Deactivate All Plugins
Plugins can sometimes conflict or malfunction, leading to timeout errors. To identify the problematic plugin, deactivate all plugins and reactivate them one by one.
Option 1 – From the WordPress Dashboard
Log in to your WordPress admin panel.
Navigate to Plugins → Installed Plugins.
Select all plugins, choose Deactivate from the dropdown menu, and click Apply.
Open your website in an incognito window to check if the issue is resolved.
If the error disappears, reactivate the plugins one by one to identify the culprit.
Option 2 – From the SFTP
If you cannot access the WordPress admin dashboard:
Login SFTP and connect it First.
Navigate to the wp-content folder.
Rename the plugins folder to plugins_disabled to deactivate all plugins.
Check if your website loads correctly.
If the error is resolved, rename the folder back to plugins and then rename individual plugin folders one by one, testing your site after each rename to identify the conflicting plugin.
4. Switch to a Default WordPress Theme
A poorly coded or incompatible theme may cause timeout errors. Switching to a default WordPress theme can help determine if the theme is the issue.
Option 1 – From the WordPress Dashboard
Log in to your WordPress admin panel.
Navigate to Appearance → Themes.
Activate a default theme such as Twenty Twenty-Four.
Check your website in an incognito window.
If the error disappears, your previous theme may be the cause.
Option 2 – From the SFTP
If you cannot access the WordPress admin dashboard:
Login SFTP and connect it First.
Navigate to the wp-content/themes folder.
Rename your active theme’s folder (e.g., mytheme_disabled).
WordPress will automatically switch to a default theme.
Check if the issue is resolved.
5. Consult a Website Developer
If the "Connection Timed Out" error persists after trying the methods above, it may indicate a deeper issue within your website’s code. A professional developer can:
Debug custom code.
Fix configuration or database issues.
Resolve plugin or theme compatibility problems.
Optimize your website for better performance.
Conclusion:
The "Connection Timed Out" error in WordPress is usually caused by memory limits, execution time restrictions, plugin conflicts, or theme-related issues. By following the troubleshooting steps outlined in this guide, you can identify and fix the issue efficiently. If the problem persists, seeking professional assistance may be necessary.
By increasing PHP memory, adjusting execution time, disabling problematic plugins, and switching to a default theme, you can often resolve this issue and restore normal website functionality.
Last updated
Was this helpful?