How to Fix 504 Gateway Timeout Error in WordPress

504 gateway timeout error

Getting errors on the website is not just frustrating, but it also costs website trust. Let’s assume your customer is trying to open your WordPress website. They can see only a blank page with http status code 504 gateway timeout error appearing on the screen. 504 gateway timeout is a server-side error. It occurs when a server is attempting to load the webpage for you, but its not getting a response from another on time the server to whom it requests the webpage. The worst part of the error is that search engine crawlers think this is a problem from your website rather than the server. So you’ve got to hurry to fix this issue if you don’t want to lose your ranking on the search engine.

Let’s Step into the Solution to Fix 504 Gateway Timeout Error

Solution 1

Reload the website

Here and there the 504 gateway timeout error occurs probably due to the web hosting server is down. (see our blog on how to choose best WordPress Hosting in 2020). Give it a few minutes and afterward try to reload your webpage once again.

On the off chance that the problem resolves, at that factor, you don’t want to make a few different strides. If the error reappears or suggests up sooner or later, proceed to follow the following steps.

Solution 2

Turn Off VPN Administration

VPNs can also be the reason for the 504 gateway timeout error. If you use a VPN service to browse the website, then immediately disable it. Probably the web hosting server is not responding to the VPN server. One can choose to hop on to different VPN servers or otherwise contact the VPN service provider to help you with their service.

Solution 3

Turn off the website Firewall!

A DNS level firewall for the website may sometime be the reason for the cause of 504 errors. If you are using any, then disable it. Why are you facing that is because a web hosting server may choose to block the firewall. In this case, one must contact the service providers to list out the IP addresses. Now, a web host can aid you by whitelisting the addresses you enlisted. You must now be able to connect to the WordPress website without any grievances. 

Solution 4

Turn off the proxy!

If your computer is using a proxy server to connect to the internet, it may probably be due to the proxy server not getting any response from the website. In that case, you might be unable to get a response from your WordPress website. 

You must contact the internet service provider to help you get away with the problem by changing the network settings or disabling the proxy server for you.

Solution 5

Check your website Database!

A corrupted database can cause a 504 gateway timeout error. In any case, your Database may additionally require a few cleaning. One can perform this by a phpmyadmin. It would be best if you create the backup of the WordPress database early even to play out any action. So to have a backup using phpMyAdmin can be done by following steps, 

  1. Go to the WordPress database. Login in to Cpanel > file manager > database >phpmyadmin. From the window, select the Export tab, and there are various options available for you. Select the custom method and choose the zip format.

Or you can choose to clean the Database using Wp sweep plugin by installing and activating it in WordPress

  1. Go to sweep plugin tools, and select sweep to clean up the Database.
  2. It generates a report as to how much you can clean, based on that cleanup database.

Solution 6

Disable the plugins and move to the default theme!

Faulty or corrupt Plugins and themes can cause a 504 gateway timeout error in WordPress. You need to debug the error one by one.

To debug the plugin or deactivate plugins from Cpanel, follow our blog on how to disable WordPress plugins step by step. If it doesn’t fix the error 504, then try debugging the WordPress theme.

As we know, a theme can also be a reason behind error 504, let’s fix it!

How can you do so? And that’s simple as it seems like, by changing it to the default theme.

To do so, 

  1. Access your website file using an FTP client. Or the other way is to connect through a file manager from the Cpanel.
  • If that’s connected, look for wp_content/themes/ folder. Here you can see the all installed theme on WordPress. Look for the activated theme and Have a copy of this by downloading it to your PC.
  • Now delete the activated theme, right-click > delete
  • Default WordPress Installed theme automatically gets activated.

Now refresh your website to check that the error exists resolved. If not, follow me to the next step.

Solution 7

Alter the DNS services!

While the internet being the source to connect to the website, it uses a DNS server to help you connect to all other servers. So, now, if the DNS server is not communicating with the website, you likely see the 504 gateway timeout error.

One can fix the DNS servers by changing it on the device. To make the changes, go to the Control panel and hover over to the Network and Sharing center setting of your PC or Laptop.

Conclusion

504 gateway timeout error isn’t that frustrating as it seems like as It majority of the time it pops up due to server failure. But getting away with this is easy if you could follow the steps above. If you have any other doubts, do mention in the comment box.

If you liked this tutorial, then please subscribe to our YouTube Channel You can also find us on Twitter and like us on Facebook.

Leave a Reply

Your email address will not be published. Required fields are marked *