6 proven methods for fixing the 504 Gateway Timeout error

8 min read
Aman Jha

When a server receives the HTTP status code ‘504 Gateway Timeout,’ it indicates that it was unable to get a timely response from the remote server when trying to load the web page or fulfil some other request made by the browser.

In other words, if a website you're visiting encounters a 504 Gateway Timeout error, it means that it isn't receiving a quick response from another computer on which it depends.

This article will examine the 504 Gateway Timeout error and provide advice on how to resolve it.

What is the 504 Gateway Timeout?

As explained, any time a user sees a 504 gateway timeout, it's because the server they were attempting to connect to didn't get a prompt response from another server it needs to show the website.

The HTTP status code 504 is what web servers use to indicate this particular problem.

There are a lot of potential causes for this error, but the two most typical are:

  • A high volume of requests
  • Routine maintenance being conducted on the server

Related: Why you need to institute two-factor authentication now

How to fix 504 Gateway Timeout

IMPORTANT: Please ensure that your website has been backed up before continuing with any of these solutions.

1. Check your site’s plugins and themes

It is possible for plugins to trigger server timeouts by submitting an excessive number of uncached requests to the queue. This may lead to a 504 gateway timeout error and a significant drain on PHP resources.

Software developer working on a computer

A 504 error may show up on your site if there is a problem with your theme or a plugin. If either your plugins or your theme is creating the issue, updating both of them should be your first step in finding a solution.

Check to see that all of your WordPress components — core, plugins, and themes — have the most recent updates installed (if you have a WordPress hosting plan from GoDaddy, they do this for you automatically).

Turning off WordPress add-ons may also solve the 504 Gateway Timeout error.

Here’s the other part of this solution: Switch to the default theme

Although 504 timeout issues are uncommon when using a theme, it is entirely dependent on the theme's implementation and design.

Test the site by switching to one of WordPress's default themes.

When troubleshooting, the WordPress default themes are usually the most reliable choice. This is so because they are created and maintained by WordPress.org's core team of programmers.

2. Modify your system's proxy settings

A shortage of resources is not the only possible cause of proxy server issues. It's also possible that users’ requests aren't being processed as they should because the server is set improperly.

Such an incident often occurs with NGINX proxy servers due to the 504 gateway timeout that is connected to the configuration.

Fixing this only requires adding a few lines of text to the configuration file.

3. Verify your database and content management system

504 gateway timeout issues aren't always server software-related.

It's possible that your website's content management system, database, or other programs are to blame for the lengthy HTTP processing times. If users consistently get the error message, it's possible that a flaw exists in one of these components.

Timeout errors are also sent by servers if the database the website is using is poorly optimized or becomes damaged. In such a circumstance, it is necessary to fix and enhance the database.

Before executing any kind of repair or inspection, it is strongly suggested that a backup of the databases be kept.

Depending on the server platform, you may choose from a variety of optimization and repair options for your database corruption.

Similarly to proxy servers, the most common cause is incorrect configuration, which must be identified and corrected.

It's also possible that outdated or malfunctioning plugins are responsible for the CMS difficulties you're seeing. In this case, you should either disable the plugins or update them.

4. Get in touch with the site host or ISP 

If you determine that your ISP (internet service provider) or web host may have a faulty server somewhere in the communication path, asking them to fix the issue is your only option here.

Contact your domain host if the 504 Gateway Timeout error has not been addressed after many hours. A 504 error on your WordPress site might be the result of a variety of more serious problems. To further understand the root of the issue, have your web host examine your server.

5. Remove spambots and shield your site against DDoS attacks

You should also think about spambots and cyberattacks. A server may be rendered inoperable or very sluggish by a distributed denial of service (DDoS) assault.

If you suspect that your site is being attacked, check the firewall's activity logs.

Errors related to timeouts might occur if the software is not properly coded. You may attempt debugging to see if you can find the shady code. The web pages should also be reviewed since this information will point you in the direction of the bad code.

When testing the code, utilize two screens:

  • One for the testing
  • Another for seeing the real-time logs

A website's code can be debugged in a number of different methods. You can use add-ons for Firefox like Firebug or online resources like Chrome's Developer Tools.

Editor’s note: The one-stop website security tool from GoDaddy comes with a firewall, automatic backups, an SSL Certificate and a malware scanner.

6. Hire a WordPress developer

Woman seen from behind her desk

Having a WordPress developer monitor your website and address errors as soon as they arise is the best approach for a business owner.

A lapse in service may damage your company's credibility with customers and lower its overall reputation. The cost may be substantially more than if you hired a freelance programmer to do the work.

If you are thinking about hiring a maintenance service, you should definitely go for a competent WordPress developer rather than an amateur one.

Related: Looking for a freelance web developer?

What causes a 504 Gateway Timeout?

A 504 Gateway Timeout issue might have several origins. Here are six of the most frequent ones:

Invalid URLs

A 504 Gateway Timeout occurs when the URL is faulty or invalid. This happens often when users enter incorrect symbols into web URLs.

Wrong server configuration

Error 504 Gateway Timeout may also occur if the server is incorrectly configured. There might be an issue with the server's configuration or the firewall.

DNS Issues

DNS problems are another major source of 504 Gateway Timeout errors. The 504 Gateway Timeout error message appears when the Domain Name Server (DNS) is either incorrectly configured or overloaded.

WordPress plugins and themes

Sometimes developers might forget to update the plugins and themes to work with the most recent version of WordPress. Always double-check with the plugin or theme's creator to make sure it's compatible with the most recent release of WordPress.

Server overload

One of the most prevalent reasons for the HTTP 504 Gateway Timeout issue is server overload.

A 504 Gateway Timeout occurs when a server receives an excessive number of requests at once and is unable to process them all. This might be due to:

Browser cache

Magento Vs WooCommerce Developer at Work

The browser's cache might potentially be at blame for the 504 Gateway Timeout. An error may occur if the files stored in the browser's cache are outdated or corrupted. This can be fixed by clearing the browser's cache or switching to a different browser.


While it shouldn't be overlooked, generally a 504 Gateway Timeout error isn't anything to worry about. This blog post makes resolving the 504 Gateway Timeout problem a breeze.

Attempt the simplest solutions first.

It may take some investigation into both the site and your browser settings to get to the bottom of the issue.

The sooner you address this problem, the less damage it will do to your search engine rankings and the more satisfied your site's visitors will be.

FAQs about 504 Gateway Timeout error

Is a 504 Gateway Timeout my fault?

No, the 504 Gateway Timeout error is not your fault. The 504 Gateway Timeout error simply means the browser submitted an HTTP request to the server but didn't get a response in time from another server.

What is default gateway error?

When your wireless router's connection is down, it can cause the default gateway error.

How a user can fix gateway timeout?

A user may try the following easy solutions to fix the gateway timeout error:

  • Refresh the web page
  • Try restarting your modem or router
  • Turning off your computer's firewall and antivirus protection
  • Turn off your VPN or proxy settings
  • Clear cache
  • Switch off DNS servers

These methods can also be used to resolve 504 timeout error in Java.