Connection Timeout

How to fix the WordPress “Connection timeout” error 2024?

WordPress is widely used for creating websites; more than 810 million websites use WordPress. All these users might have faced the “connection timed out” error at some point or another, and this is seen more often in poor shared hosting.

The error message appears when you have exhausted all the resources or memory available from your web hosting. In this article, we provide quick solutions such as increasing PHP memory, detecting and deactivating faulty plugins, switching to compatible themes, and extending execution time.

But you will never face errors if you use Hostbet shared hosting, because Hostbet offers affordable and reliable shared hosting in India without compromising on performance.

Cause of the WordPress Connection Timeout

Frequent connection timeout messages can frustrate anyone, especially if you’re the owner. Most beginners use shared hosting to host their website, where multiple websites already coexist on the same server.

Sometimes web hosting companies host more sites than the limit on a single server. Due to a lack of resources and the large number of sites. Hence, this error occurs (connection timeout).

Moreover, this error can also be caused by faulty plugins or themes; sometimes it can also be caused by low PHP memory or low execution time on the server.

How to fix the WordPress “Connection timeout” error

Exhausted PHP memory limit

One of the most common causes of this “connection timeout” error is the available PHP memory limit via editing wp-config.php files.

For wp-config.php, you need access to your website’s root directory through FTP or the File Manager.

In a `wp-config.php` file. Open it using a text editor and add the following line just after the “That’s all, stop editing! Happy Publishing”

define('WP_MEMORY_LIMIT', '2048M');

This will increase the memory limit of your WordPress website to 256MB. Increasing the memory limit can help prevent critical memory-related errors.

Deactivate Faulty Plugin

Another cause of this WordPress Connection timeout error is that sometimes poorly coded, faulty, and incompatible plugins trigger this critical error.

To fix this error, you need to deactivate all plugins. Just reactivate plugins one by one and identify the problematic ones.

Incompatible Theme (set default theme)

An incomplete or faulty theme can also trigger this critical error. To fix this “connection timeout error,” you need to move your current theme to a default provided by WordPress, such as Twenty Twenty-one.

If your WordPress dashboard is not opening, then you can easily deactivate it via the root directory through FTP or the File Manager. You need to rename the theme; that’s it. Your theme is deactivated because you can easily set the default theme.

Increase the maximum Execution Time 

Another cause of the timeout error is a lower maximum execution time value. To fix this WordPress error, you need to edit the PHP.ini file and do this: Following the changes, just update the default value from 30 to 60 seconds.

max_execution_time=60;

Conclusion

The “connection timeout” issue, which is common in poor shared hosting. It is caused by a lack of resources, overcrowding on servers, faulty plugins or themes, and PHP memory or execution time limits. This article offers fast fix solutions such as increasing PHP memory, detecting and deactivating defective plugins, switching to suitable themes, and increasing execution time.

FAQ (Frequently Asked Questions)

What causes the “connection timeout” error in WordPress?

The “connection timeout” error in WordPress can be caused by various factors, including overburdening shared hosting servers, faulty plugins or themes, low PHP memory, or low execution time.

How can I increase PHP memory limit to fix the error?

To increase the PHP memory limit, you can edit the wp-config.php file in your website’s root directory. Add the line define(‘WP_MEMORY_LIMIT’, ‘2048M’); before the “That’s all, stop editing! Happy Publishing” line. This will increase the memory limit to 256MB, 

Scroll to Top