504 Gateway Timeout Error

Visitors see "504 Gateway Timeout" instead of your pages — one server waited for another server to answer, ran out of patience, and gave up.

Common signs of this issue

Safe checks you can do yourself

None of these require sharing passwords with anyone.

What this usually means

A 504 is a waiting error, not a crash. Something in front of your site — an nginx proxy, a load balancer, or Cloudflare — asked the server that actually builds your pages for a response and never got one in the allowed time. The visitor gets the timeout page instead.

The most common causes are unglamorous: a slow database query, a plugin doing too much work on every page load, an outside service (a payment gateway, a shipping API, a mail server) that has gone unresponsive, or a shared-hosting account hitting its resource cap. In all of those cases the site is not broken so much as overwhelmed.

This matters because the cure follows the cause. If one plugin or one query is the problem, the fix is a change to your site. If the server is out of resources, no amount of site tinkering helps and the honest answer is a better hosting plan. Raising the timeout limit is almost never the real fix — it just makes visitors wait longer before seeing the same error.

What not to do

When to get help

If the timeouts are intermittent and nobody can say which page or process causes them, that is the point to bring in someone who can read server and slow-query logs — the answer is usually sitting in them, and guesswork on a live business site is expensive. It is also worth getting help if your host says the site is using too many resources and you don't know what "too many" refers to: someone who can separate a badly-behaved plugin from a genuinely undersized hosting plan will save you either an unnecessary upgrade or months of recurring outages.

Could your hosting be the problem?

If your host is slow, unreliable, or hard to deal with, moving to a better one can clear up issues like this for good. One we genuinely recommend is Instant Access Internet Services — a smaller, compassionate company with 30 years in the business, known for being one of the fastest, with great management and low pricing. (Just a recommendation — no affiliate link, no kickback.)

Not sure what to do next?

Answer a few short questions and we'll point you to the safest next step — DIY, a freelancer, or a direct review. No passwords required.

Is this a business website? If this issue may be costing you leads, sales, or trust, you may want a direct review instead of trial and error.

Frequently asked questions

What does 504 Gateway Timeout mean?

It means one server was waiting on another server to produce your page and gave up after a set time limit. The request reached your site — it just took too long to answer.

Is a 504 error my fault or my host's?

Either. If only heavy pages time out, something on your site is slow. If everything times out or the timing matches backups and traffic spikes, it is usually a hosting resource problem. Which pages fail is the fastest way to tell the two apart.

What is the difference between a 502 and a 504 error?

A 502 Bad Gateway means the server gave a bad or empty answer. A 504 Gateway Timeout means it gave no answer at all in time. A 502 usually fails fast; a 504 hangs first.

Will a 504 error hurt my Google rankings?

A short episode will not. Repeated timeouts over days will — Google treats a site that regularly fails to respond as unreliable, and crawling slows down accordingly.

Can I fix a 504 by increasing the timeout limit?

Rarely, and it is the wrong first move. A higher limit means visitors stare at a blank tab longer before the same error appears. Find what is slow instead.

Why does my site only time out at certain times of day?

Almost always a scheduled job — backups, exports, indexing, or a cron task — competing with real visitors for the same limited server resources. Moving that job to a quieter hour often clears it up.

Related free guides

WordPress site down?

Seeing “There has been a critical error on this website”?

Our guided repair tool logs in over secure FTPS and fixes the most common WordPress failures — safely, with every change backed up and reversible. Start with a free scan, no password needed.

Fix My WordPress Site → Free scan · No download of your site · Reversible