Home WordPress Errors How To Fix The 504 Gateway Timeout In WordPress

How To Fix The 504 Gateway Timeout In WordPress

128
How To Fix 504 Gateway Timeout In WordPress

In this tutorial, We’ll show you various methods on how to fix the 504 gateway timeout error in WordPress.

Table Of Contents

What is a 504 Gateway Timeout Error?

504 Timeout Error

The 504 gateway timeout error will happen when one server did not get a response from another in a timely manner.

For example, DNS communicates the web hosting server when presenting pages to a visitor. If there is a hiccup in the response from the hosted server and it takes too long, you might see a 504 error.

Unfortunately, an error 504 gateway timeout in WordPress is caused by a lot of things. Anything from a badly developed HTACCESS file to inappropriate plugins can cause a heavy server response.

When the website is unavailable due to this problem, you may lose visitors. You can also encounter a drop in search rankings if Google comes across your site as it’s projecting the 504 error.

In other words, it’s incredibly essential to continually assure the stability of your website.

In most cases, the fixes for this kind of problem are almost simple. The problem is that it can take quite a long time to eventually discover the issue.

A few of the situations that can create a 504 gateway timeout error include:

  • DNS Problems
  • Slow Server Issues
  • Blocks from Firewalls
  • Proxy Server Connection Issues
  • Website Development Errors
  • Web Browser Problems
  • Network Connectivity Errors

So what are the things you can do to fix a WordPress 504 gateway timeout error?

SEE ALSO  How To Fix A Website With Blocked Mixed Content In WordPress

1. Wait for Server Response

Sometimes the most useful thing you can do is nothing at all. In some cases, you may just need to wait till the server responds.

In fact, there is a huge number of devices between you and the web host. A problem at any one of these devices can cause a slow response. In this situation, you can just check your website a bit later.

It can take anywhere from a few minutes to a few hours, depending on the underlying problem.

2. Disable Your VPN

Virtual private networks, or VPNs, are frequently popular nowadays. But, these VPNs may also have problems communicating with the web hosting server.

If the WordPress website is displaying you a 504 gateway timeout error, try disabling the VPN. If the website starts running, you know the problem lies somewhere in the VPN itself.

You may want to contact your provider for more information.

3. Disable the Website’s Firewall

Firewalls are great at blocking out hackers, bots, and malicious coding. Unfortunately, it’s this awesomeness that often poses a problem. If your firewall is too strict or is having a problem, it can create errors in browsing.

This usually happens from third-party firewalls outside of the WordPress ecosystem. Try disabling it to see if the problem clears up.

4. Verify the HTACCESS File

The HTACCESS file of your site manages how people and bots view your content. If there is a problem within the file, it could simply throw different errors including 504.

htaccess file

Take a few moments and examine the HTACCESS file for WordPress. Sometimes a plugin or incorrect settings can wreak havoc.

If you’re uncertain about how it works, you can always create a new file to use as a test.

SEE ALSO  How To Fix Cannot Modify Header Information In WordPress

5. Clean the Database for WordPress

A cluttered database can cause all kinds of problems for WordPress. The system will even save every change in every post you create. This amount of digital debris will create issues in a database.

It’s always a good idea to routinely clean and optimize the database. It may prevent the gateway timeout error from happening while improving the performance of the website.

clean database

6. Disable Plugins in WordPress

Plugins provide a way to expand what the website can do for visitors and admins. Still, some can also promote a variety of issues including a timeout from the webserver.

Deactivating all the plugins lets you identify whether one of them is giving you a problem or not. If the 504 error goes away, re-enable the plugins one by one until you come across the one causing the issue.

disable plugins

7. Switch to the Default Theme

While themes don’t usually cause 504 timeout errors, it is possible. This totally depends on how the theme was developed and any of its integrated features.

Switch to one of the default WordPress themes, like Twenty Sixteen, and test the site.

default theme

The default themes in WordPress are often the most reliable when it comes to troubleshooting. This is because they are created and managed by the developers at WordPress.org, especially for the core system.

8. Monitor for Attacks from Bots and Spam

You might also want to consider attacks from bots and spammers. A distributed denial of service attack, or DDoS, can render a server useless or incredibly slow.

Although the web host’s servers normally stop these kinds of attacks, it’s not unusual for them to still occur.

Check your firewall’s logs to see if your site is being attacked.

SEE ALSO  How To Fix Error Establishing A Database Connection

Extra things to Try

The 504 gateway timeout error can also be caused by a number of external things not associated with your WordPress website. In fact, sometimes it’s generated by your own web browser.

Here are a few things you might want to check on your end if you see this problem persist.

  • Clear the Browser’s Cache
    The web browser’s cache can store problematic web coding. This may cause a variety of errors, and emptying is possibly one of the most obvious ways to fix the problem.
  • Turn off Network Proxy
    If you use a network proxy, you might want to consider disabling it. In some cases, proxies are incapable of receiving a response from the site’s server and will show you the 504 error.
  • Reboot Your Networking Devices
    It’s always a good idea to power cycle your networking devices. This includes everything from your computer to your router or network hub. Don’t forget to reboot your Internet device as well.
  • Try a Different DNS
    Sometimes your ISP’s DNS may have a glitch in the system. You can always use the “8.8.8.8” DNS server in your device’s network settings. This is the Google Public DNS and often resolves common connection problems.
  • Contact Web Host or ISP
    Finally, you can always contact your ISP or web hosting provider to assure that there is nothing wrong on their end. An outage can create a lot of problems including the 504 gateway error.

There is a lot of things that can affect Internet connections and website behavior. Just be patient!

It May Needs Troubleshooting

In fact, several things can cause the error 504 gateway timeout in WordPress. From the site itself to your own browser, it takes a bit of troubleshooting to find the problem source.