How to Resolve the WordPress 504 Gateway Timeout Error

On your WordPress site, have you ever received a 504 gateway timeout error? Users may be unable to access your website as a result of this problem. Worse, if the underlying issue is not resolved, it can disappear and recur on its own. We’ll show you how to fix the 504 gateway timeout error in WordPress in this article

What Causes the Error 504 Gateway Timeout?

When a server is unable to connect to an upstream server to fulfill a request, the 504 gateway timeout error occurs.

A 504 gateway timeout error, for example, will appear in your website firewall, such as Sucuri, which is unable to connect to your WordPress server.

The look and feel of the error page, as well as the message, may vary depending on your WordPress hosting provider, proxy server, or browser. Some of the most common 504 gateway timeout error messages are shown here.

  • 504 Gateway Timeout
  • HTTP 504
  • 504 ERROR
  • Gateway Timeout (504)
  • HTTP Error 504 – Gateway Timeout
  • Gateway Timeout Error

While a proxy server being unable to reach the upstream server is the most common cause of the error, it can also be caused by other hosting configuration errors.

Let’s have a look at how to troubleshoot and resolve the 504 gateway timeout error in WordPress.

1,Reload and wait

A transient malfunction on your WordPress hosting servers might sometimes produce the 504 gateway timeout error. Allow a few minutes to pass before attempting to reload your webpage.

If the problem goes away, there’s no need to take any more action. Continue reading to troubleshoot and fix the problem if the error remains or occurs after a while.

2.Disconnect from the VPN

If you’re using a VPN to access the internet, try turning it off. If your VPN server is unable to receive a response from your managed WordPress hosting server, a 504 gateway timeout error will occur.

If your website reappears, the VPN server was the source of the problem. If utilizing a VPN is critical to you, you can now try moving to a different VPN server. If the issue persists even after switching servers, you should seek assistance from your VPN service provider.

3.Disable the Website Firewall

If you’re utilizing a DNS-level website firewall, such as Sucuri or Cloudflare, try temporarily turning it off. This will enable you to connect directly to your WordPress hosting server.

If that resolves the problem, your hosting server is most likely blocking the firewall IP addresses that are causing the problem. You’ll need to receive a list of IP addresses from your firewall service provider, then contact your web host to whitelist those IPs.

Disabling the firewall may sometimes reveal the actual server error notification. If that’s the case, you should look over our list of common WordPress issues to figure out what’s wrong.

4.Turn off the proxy server on your network.

If you use a proxy server to access to the internet, that server may be unable to receive a response from your WordPress website.

To see if your website is down just for you or for everyone, try visiting it using a different internet connection or using online services.

If it’s only down for you, you’ll need to adjust your network settings. You can ask your internet service provider or a network administrator to help you troubleshoot the problem.

5.Make a DNS Server Change

DNS servers are used to manage your internet connection. These servers assist your computer in connecting to many internet servers.

A 504 gateway timeout error can occur if the DNS servers you’re using are down or unable to connect to your website. Changing the DNS servers your device uses is the simplest approach to check this.

You may discover them in the Control Panel » Network and Sharing Center screen on a Windows machine.

On a Mac, you’ll find them in the System Preferences » Network. Select the DNS tab after clicking the Advanced option.

You can apply modifications by changing your DNS server address to 8.8.8.8 and 8.8.4.4.

Now is a good time to go to your website. If this fixed your problem, you’re finished. The issue was with your internet connection, which has now been resolved.

6.Make sure your WordPress database is clean.

A 504 gateway timeout issue can also be caused by a damaged WordPress database. Don’t be concerned; your WordPress data is almost certainly safe. Your database, on the other hand, may use some spring cleaning.

This is readily accomplished by using phpMyAdmin or a plugin like WP-Sweep to optimize your WordPress database. Before you do anything, make a backup of the WordPress database.

7.Turn off all WordPress plugins and use the default theme.

A 504 gateway timeout issue is less likely to be caused by WordPress plugins and themes. However, if a plugin or theme makes too many calls to the server, some of these requests are likely to fail and result in a 504 gateway timeout error.

You’ll need to disable all WordPress plugins via FTP to test this.

After that, check to see if the error has been addressed on your website.

If that’s the case, one of your plugins was to blame. You must now enable each plugin one by one until the error can be reproduced. This will assist you in identifying the plugin that is causing the issue.

If disabling plugins didn’t fix the problem, you should look into your WordPress theme. You’ll need to use phpMyAdmin to change your WordPress theme.

Check your website after switching to the default WordPress theme to see if it’s working.

8.Additional Troubleshooting

If all else fails and you still can’t fix the 504 gateway timeout error, go through the steps in our beginner’s WordPress troubleshooting tutorial.

Finally, as a final resort, you should contact your hosting company for assistance. They might be able to help you solve the problem or direct you in the proper way.

We hope that this post has taught you how to fix a 504 gateway timeout in WordPress. You might also be interested in our tutorial on how to protect WordPress from brute force assaults.

Leave a Reply