Fix the 504 gateway timeout error in WordPress

Do you want to fix the 504 gateway timeout error in WordPress website? Looking for a way to fix the 504 gateway timeout error in WordPress?

In this article, we will show you the easiest and most efficient way to resolve the 504 gateway error on your WordPress website.

Your users won’t be able to visit your website when this type of error occurs. When a user can’t visit your website, it will give them a critical perception of your website, and they will leave it instantly. Your website’s bounce rate will increase as a result, which is harmful to SEO.

Why did the 504 gateway timeout error occur in WordPress?

The major cause of this issue is a connection failure to the upstream server. When a visitor visits your website, the browser sends a request to the page. If the browser fails to connect to the upstream server, it will return the 504 gateway timeout error.

When the proxy server isn’t able to connect to the upstream server, this occurs. This is the most common cause, although the incorrect configuration in your hosting account might also result in this issue.

It will display the following error messages depending on the hosting services you are running. Some examples of typical error messages are:

  • HTTP 504
  • 504 error
  • Gateway Timeout error
  • Gateway Timeout 504

Fix the 504 gateway timeout error in WordPress

The problem also occasionally appears as an unexpected web server defect. You don’t need to take any action if the issue was due to a temporary fault.

Reload your website after a couple of minutes. If it was a problem, the error must have been resolved, and no further action is required. but you must confirm that it was a fault.

Wait a while before checking again to see whether the error still exists. If it still occurs after a few minutes, you must do the next action.

Disable website firewall

You must enable or disable the firewall services if you are running a powerful website firewall service.

The firewall prevents you from directly connecting to your server. After you disable it, you will be able to connect directly to your hosting server without interruption.

Check to ensure that the error still exists. The firewall’s IP may block your hosting server, which was the reason for the error.

You must contact your firewall service provider to obtain their IP address list in order to resolve this conflict. After that, contact your hosting company to have those IP addresses unblocked.

Disable VPN

If you are using a VPN service, you should disable it. The VPN service may often not be able to connect to your hosting server, resulting in the 504 gateway timeout error.

If the problem has been resolved, the VPN is responsible. If having a VPN is critical for you, try switching VPN services. If it isn’t working, contact the VPN service provider for support.

Turn off the network proxy

If you use a network proxy, you must disable it. The network proxy server may possibly fail to connect to an established network with your WordPress hosting server.

So, you need to identify if your website is down for everyone or just you. Try using a different internet connection to access your website. If other internet connections to your website work OK, the issue is likely in your network configuration. To fix this, you must modify your network settings.

Clean up the WordPress database

This kind of issue might also be caused by a corrupt WordPress database. So, you must remove any unnecessary files from your database.

Keep in mind, to make a backup of your database before doing any cleanup. To create a complete backup of your website, there are multiple backup plugins available.

Deactivate all plugins and switch to the default theme

The issue can happen if the themes and plugins send too many requests to the server. As a result, you must deactivate your plugin and switch to the default theme. Then, one by one, enable the plugins to see if the error has been resolved.

Wrapping Up

Following the steps, you will be able to resolve the 504 gateway timeout error in WordPress.

We hope this article will help you to fix the 504 gateway timeout error in WordPress website.

You can visit our other articles to learn: How to fix the WordPress login not working error

Our Services

WordPress Website Development Services

If you want to create a WordPress website/WooCommerce website, Kindly visit our services:

  • Professional & Responsive WordPress Website
  • eCommerce Website With WooCommerce
  • Speed Up WordPress Website
  • WordPress Website Security
  • WordPress SEO
Our Services