Shahriar Kabir

Software Engineer

MCPD

OCJP

MCSE

Shahriar Kabir

Software Engineer

MCPD

OCJP

MCSE

Blog Post

How to Solve the Connection Timed Out Error in WordPress

July 16, 2021 WordPress
How to Solve the Connection Timed Out Error in WordPress

Connection Timed Out – If you see the “ERR_CONNECTION_TIMED_OUT” error in WordPress, it usually means your website is trying to do more than it can manage all at once and is pretty common if your site is on shared hosting.

The common WordPress error is the ‘connection timed out’ that is caused by an overburdened shared server. This type of error occurs because of the overburdened shared server. The main causes are heavy plugins, theme function issues, and exhausted PHP memory limit.

Some of the leading causes of this problem are resource-hungry plugins, issues with your theme functions, and PHP memory exhaustion.

You can begin troubleshooting this issue by deactivating your plugins one by one and then trying to access your website after each deactivation. You might find that one of your plugins is causing the error.

Another possible solution is increasing your memory limits in PHP and WordPress using the steps we outlined earlier in the article.

If none of that works, it’s a good idea to contact your hosting provider to see if they help.

How to Solve the Connection Timed Out Error in WordPress

Before making changes to a website, make sure you always take a full backup of the website files and database. Let’s see how to fix this error in each situation.

1. Exhausted PHP memory limit

A common cause of this error can be insufficient memory. So, to increase the limit of the available memory, we edit the wp-config.php file.

For this, we open this file located in the website root folder and add the following line and save the file.

define('WP_MEMORY_LIMIT', '64M')

Hence, it increases the memory limit to 64MB.

Similarly, we can increase the PHP limits in the PHP configuration files as well.

2. Faulty plugin

Another possibility for WordPress timeout error is the plugin incompatibility.

In such cases,  deactivate all plugins and then reactivate them one by one until we find the affected plugin. Later, we deactivate the faulty one.

3. WordPress theme

Likewise, a faulty theme can also be the reason for the WordPress connection timeout.

To fix this problem, switch to the default WordPress theme.

Initially, we go to the theme folder. Then, we rename the current theme folder to activate the default theme.

4. Increase the maximum execution time

Another reason for the timeout error is a lower value set for the maximum execution time.

Hence the process ends before it is completed. Fix this by editing the php.ini file.

We open the php.ini file and add the following,

max_execution_time=60; 

The default value is 30 seconds. Hence we avoid timeout errors.

Related posts:

Write a comment