The “Connection Timed Out” error (often appearing as an ERR_CONNECTION_TIMED_OUT in Chrome) is one of the most common performance-related issues in WordPress. Unlike syntax errors that crash your site instantly, a timeout error occurs when your web server takes too long to respond to a request made by the browser.
Essentially, the server is struggling to process the PHP scripts or database queries required to load your website. After waiting for a predefined number of seconds (usually 30 to 60 seconds), your browser simply gives up and severs the connection, displaying the error.
This guide explores the technical causes of the Connection Timed Out error and provides step-by-step instructions to resolve it.
What Causes a Connection Timeout?
Timeouts are almost exclusively related to server resource exhaustion. The three most common triggers are:
- Exhausted PHP Memory Limits: A heavy theme, a clunky page builder (like WPBakery or Elementor), or a complex WooCommerce script is trying to consume more RAM than your server allows.
- Server Overload: You are on a cheap shared hosting plan, and another website on the same server is hogging all the CPU power, leaving your site starving for resources.
- Database Deadlocks: A plugin is running an unoptimized MySQL query that locks the database, preventing other processes from completing.
Step 1: Increase Your PHP Memory Limit
The first and most effective troubleshooting step is to allocate more memory to WordPress.
- Connect to your website via FTP or your hosting control panel’s File Manager.
- Open your WordPress root directory and find the
wp-config.phpfile. - Edit the file and add the following line just above the
/* That's all, stop editing! */comment:
define( 'WP_MEMORY_LIMIT', '256M' );
Save the file and refresh your website. If it loads, you’ve solved the problem.
Note: If you are on entry-level shared hosting, your host may restrict you from increasing this limit. In that case, you must upgrade your hosting environment.
Step 2: Increase the Maximum Execution Time
By default, most Apache servers are configured to kill any PHP script that runs for longer than 30 seconds. If you are importing a large demo theme, uploading a heavy video, or running a massive database backup, 30 seconds is not enough time, resulting in a timeout.
You can override this limit by editing your .htaccess file.
- Find the
.htaccessfile in your root directory. - Add the following line at the very bottom of the file:
php_value max_execution_time 300
This increases the timeout limit to 300 seconds (5 minutes).
Step 3: Rule Out Plugin Conflicts
If increasing server limits didn’t work, a rogue plugin is likely stuck in an infinite loop, constantly draining your server’s CPU.
Since you likely cannot access your wp-admin dashboard, you must deactivate your plugins manually:
- In your File Manager, navigate to the
wp-contentdirectory. - Find the folder named
pluginsand rename it toplugins_deactivated. - Refresh your website.
If your site instantly loads, a plugin is the culprit. Rename the folder back to plugins. Your site won’t break immediately because WordPress has deactivated them all in the database. Now, log into your wp-admin dashboard, navigate to the Plugins screen, and activate them one by one. Refresh your site after every activation until the site times out again. The last plugin you activated is the broken one.
When Is It Time to Upgrade Your Hosting?
If you have tried all the steps above and your site still frequently times out—especially during traffic spikes—the harsh reality is that your current hosting environment cannot handle your website’s demands.
Shared hosting environments limit your CPU and RAM usage to prevent you from affecting other users on the server. As your WordPress site grows, adding more plugins and receiving more traffic, you will inevitably outgrow these restrictions.
If timeouts are a recurring nightmare, it is time to migrate to a Virtual Private Server (VPS) or our optimized, high-performance WordPress Hosting. Unlike shared hosting, a VPS provides dedicated resources (CPU cores and RAM) that are exclusively yours, ensuring your site remains lightning-fast and online, no matter how much traffic you receive.
Prevent gateway timeouts during traffic spikes with optimized WordPress Hosting in Pakistan.
