Skip to content

How to fix ERR_CONNECTION_TIMED_OUT on a WordPress site

ERR_CONNECTION_TIMED_OUT means the browser tried to connect to your site's server and got no answer. WordPress was never reached, so the cause is the server, a firewall, DNS or your own network. Check from a second network first, then follow what that shows.

By
WP Ministry
Published
Tested on
WordPress 7.1.3, PHP 8.3.35

In short

  • The browser asked the server for a connection and got no answer. No web server, PHP or WordPress was reached.
  • Your content is untouched. Nothing inside WordPress causes this error, and nothing inside it clears it.
  • Check from a second network first. If the site loads there, look at your own network or a block on your IP address.
  • A firewall that drops your address looks, from where you sit, exactly like a server that is switched off.
  • If it fails from everywhere, check where the domain points, then send your host the time and your IP address.
  • A slow plugin or a low memory limit gives a slow page, a 500 or a 504. It does not give this error.

ERR_CONNECTION_TIMED_OUT means the browser tried to open a connection to the server behind your domain and got no answer in time. Chrome heads the page "This site can't be reached" and says your domain "took too long to respond." Firefox heads it "The connection has timed out". A browser opens a connection before it asks for any page, so no web server, PHP or WordPress took part. WordPress did not print this message, and nothing in the dashboard records it.

Nothing has been lost. Your posts, pages, uploads and database are as they were. No setting inside WordPress causes this error, and none clears it. The work is finding out where the connection stops.

Tell it apart from the errors beside it

What you seeWhat happenedWhere to look
ERR_CONNECTION_TIMED_OUTThe connection attempt got no answer.This page
ERR_CONNECTION_REFUSEDThe attempt was answered with a refusal. Chrome says the site "refused to connect."The server: nothing is listening for web traffic, or a firewall rejects you
ERR_NAME_NOT_RESOLVEDThe domain's name could not be turned into an address, so there was nothing to connect to.The domain and its DNS: see the site down runbook
504 Gateway TimeoutThe connection worked. A server in front reports that the one behind it did not respond in time.Fix the 504 Gateway Timeout
Cloudflare's Error 522Your browser reached Cloudflare, and Cloudflare timed out contacting your server.The causes on this page, between Cloudflare and your server

Cloudflare's documentation names its own addresses being blocked at the host as the most common cause of a 522.

Chrome shows the same page for ERR_TIMED_OUT, which its list of errors describes only as an operation that timed out. The second fix shows whether it was the connection.

A slow plugin, a heavy database query and a low memory limit all act after the connection is made. They show as a slow page, a 500 or a 504. Raising PHP's memory limit does not fit what this error means, because PHP is never reached.

Where it goes wrong

A page request passes through each of these in turn. This one comes from the visitor's browser.

  1. Browser (this error comes from here)
  2. DNS
  3. HTTPS
  4. CDN or firewall
  5. Web server
  6. PHP
  7. WordPress
  8. Database and files

What causes it

How to fix it

Find out whether it is only you

  • Easy
  • No risk
  • About 5 minutes
  1. Step 1: Open the site on a phone using mobile data

    Turn the phone's Wi-Fi off first, so that it is on a different network.

  2. Step 2: Ask from a third place

    Put the address into the redirect checker. It shows what an address answers and every redirect on the way, asked from a server of its own. If it lists a status code, your server takes connections from elsewhere. If it says "The server took too long to answer, so the check stopped.", it got no answer either. The site health check also shows whether a page answers.

  3. Step 3: Read the result

    • It loads elsewhere and fails on one network. The server is up. Your own network is in the way, or the server is dropping your address. Use the third fix, then the fourth.
    • It fails from everywhere. The server is answering nobody, or the domain points at the wrong address. Use the fifth fix, then the fourth.
    • Another network shows a different error. Follow that one. A certificate warning is "Your connection is not private", and a redirect loop is ERR_TOO_MANY_REDIRECTS.

See which part of the request hangs

  • Takes care
  • No risk
  • About 5 minutes
  • Steps tested on WordPress 7.1.3

curl is a command-line tool that can time each phase of a request. This command is written for a terminal on macOS or Linux. Run it on the computer that shows the error, with your own address in place of https://example.com/.

bash
curl -sS -o /dev/null --connect-timeout 10 --max-time 30 -w "dns %{time_namelookup}\nconnect %{time_connect}\ntotal %{time_total}\nstatus %{http_code}\n" https://example.com/
echo "curl exit code: $?"

Each figure is in seconds from the start. curl gives up if no connection is made within 10 seconds, and ends the whole request at 30. Reduce server response time times more phases the same way.

Exit codeThe lines above itWhat it means
0A time beside connect, and a status such as 200 or 301The server answered this computer. If the browser still fails, something between the two is in the way: use the third fix.
28connect 0.000000 and a total of about 10No connection was made. This is the error on this page.
28A time beside connect and a total of about 30The server took the connection and sent no page in time. That is a slow or stuck site, not this error.
7status 000curl failed to connect. The connection was refused, or the address cannot be reached.
6status 000The name could not be resolved. Look at the domain's DNS.

Rule out your own network and device

  • Easy
  • No risk
  • About 10 minutes

Do this when the site loads from other networks.

  1. Step 1: Open another site

    If nothing loads, the fault is your connection. Chrome's error page says to check any cables and reboot any routers and modems.

  2. Step 2: Turn off the VPN or proxy and reload

    Each sends your traffic by another route. Chrome's error page suggests "Checking the proxy and the firewall".

  3. Step 3: Look at your firewall and antivirus software

    Chrome's help says to make sure neither is blocking your connection. On an office network, ask whoever runs it whether the site is blocked.

  4. Step 4: Check the hosts file

    This file ties names to IP addresses on one computer. On Linux it is /etc/hosts. A line for your domain, left from previewing the site on another server, sends this computer to that address. Remove it.

If nothing changes and the site still loads elsewhere, your address is probably being dropped. Go to the next fix.

Ask the host whether the server is up and your address is blocked

  • Easy
  • No risk
  • About 15 minutes

A firewall can ignore an address on purpose. Fail2Ban, one tool for it, scans log files and bans IP addresses that make too many failed login attempts, by updating firewall rules for a set time. As shipped, the ban lasts ten minutes and rejects new connections, which a browser reports as refused. Whoever runs the server can set it to drop them instead, and a dropped request is never answered: that is this error. A ban is on your network's public IP address, which is why a phone on mobile data still gets through. How to protect WordPress from brute force attacks covers the password guessing such a ban is there to stop.

  1. Step 1: Find your public IP address

    On the network where the site fails, search the web for "what is my IP".

  2. Step 2: Check the host's status page

    If it reports an incident on your server, the fix is theirs. Wait for it.

  3. Step 3: Send support the facts

    Give the domain, your public IP address, the time it failed with your time zone, the exact message, and whether the site loads from another network. Ask two things: is the server up and accepting connections on ports 80 and 443, and is this IP address blocked by a firewall or by brute-force protection? WordPress hosting problems has a message to copy.

  4. Step 4: If you were blocked

    Ask what triggered it. An app or a script that keeps trying an old password will earn the same block again.

Check where the domain points

  • Takes care
  • Low risk
  • About 15 minutes
  1. Step 1: Look up the domain's address

    +short makes dig print only the answer. On Windows, nslookup example.com shows the same record.

    bash
    dig +short example.com
    dig +short www.example.com
  2. Step 2: Compare it with the address your host gave you

    Your hosting panel shows your account's IP address. If the lookup prints a different one, visitors are being sent to another machine. After a move, that is likely to be the old host's.

  3. Step 3: Correct the record

    Change the domain's A record where its DNS is managed. Resolvers may keep the old answer for a while, and WordPress hosting problems explains why.

With Cloudflare or another proxy in front of the site, the lookup prints the proxy's addresses. Check the server address held in the proxy's own DNS settings instead. Cloudflare lists a mismatch there among the causes of a 522.

To undo it: Set the DNS record back to the address it held before.

On your own server, check that it listens and what its firewall drops

  • Advanced
  • Low risk
  • About 20 minutes

This is for a server you run yourself. If SSH times out too, the machine is down or off the network: use your provider's console.

  1. Step 1: See whether the web server is listening

    It lists the TCP ports that programs listen on. If :80 and :443 are missing, the web server is not running: start it and read its error log.

    bash
    ss -ltn
  2. Step 2: Read the firewall's rules

    A rule that ends in -j DROP discards what it matches and sends nothing back. One that ends in -j REJECT sends back an error. If another tool manages the firewall, list its rules with that tool.

    bash
    sudo iptables -S
  3. Step 3: See whether Fail2Ban holds your address

    Use your public IP address in place of 203.0.113.15. The first command lists the jails that ban it. The second lifts the ban.

    bash
    sudo fail2ban-client banned 203.0.113.15
    sudo fail2ban-client unban 203.0.113.15

A server that listens and blocks nothing can still be too busy. Linux may ignore a connection request that arrives at a full queue. If the error comes and goes with traffic, look at the server's load.

When to get help

If the site fails from every network, the domain points at the address your host gave you and the host says the server is up, the fault lies between them, in a firewall, a proxy in front of the site or the server's own network settings. Finding it takes access to the server, the DNS and the firewall together, and tests from more than one network.

Common questions

Should I raise the PHP memory limit or switch plugins off?

Not for this error. Both act on WordPress, and the browser never got as far as WordPress. They are steps for a site that takes the connection and then answers slowly or with an error.

Ping fails too. Does that prove the server is down?

No. ping sends a different kind of packet, an ICMP echo request, and firewalls often filter those. A server can ignore ping and serve pages. A ping that is answered while the browser times out does say something: the machine is up, and the fault is narrower.

Why does the site load on my phone and not on my office network?

The two reach the server from different public IP addresses. The office network is stopping the connection on its way out, or the server is dropping the office's address. The third and fourth fixes settle which.

More on this subject

Would you rather we fixed it?

Emergency Fix is $99. Site down or checkout broken. Goes to the front of the queue. No fix, no fee. 30-day warranty. It starts with a free diagnosis.