How to Fix the 504 Gateway Timeout Error on Your WordPress Site

293

Assuming you use a WordPress site, you may at some point encountered a 504-gateway timeout error. It makes your website inaccessible to users. What is absurd and disturbing about the error is that it may appear and frequently disappear on its own if the probable cause for it isn’t fixed. So to help you with the issue and educate you about how to fix the 504 gateway timeout error on your WordPress site, this post will serve as a one-stop solution.

Ways to fix the 504-gateway timeout error on your WordPress site

504 Gateway Timeout Error

In most cases, the reason behind the appearance of the error is the inability of the server to complete a request. However, the user may also be equally responsible for it. So, it is a must to know basic troubleshooting while keeping both the causes in mind. These solutions apply to WordPress and other sites as well.

Refreshing the website page One of the easiest ways to fix the 504-gateway timeout error on your WordPress site is to wait for a few minutes and refresh the site page. If the server is receiving too many requests simultaneously, then it does; usually, it may not handle it very well. While waiting, you can opt to see if the website is down using online tools. It is one of the best ways to see if the error is caused by a local network issue.

  • Switch to a different browser

In case the website is up but you still see the 504-gateway timeout error, try changing up your browser to a different one. Clearing browser cache or using incognito mode can also help verify if the issue is browser-related.

  • Turning off VPN

Using a VPN service to surf the internet may be one of the causes of the error. If the VPN cannot get feedback from your managed WordPress hosting server, it will result in a 504-gateway timeout error on your WordPress site. Disable the VPN and see if the website loads or not. If it does, you have found the cause of the error. If the issue persists, switch to a different VPN service provider.

  • Turning off your website’s firewall

Suppose you are utilizing a DNS level website firewall like Sucuri or Cloudflare; at that point, attempt to briefly disable the firewall. This will permit you to interface with your WordPress hosting server straightforwardly. On the off chance that that fixes the issue, all things considered, your hosting server is impeding the firewall IP addresses, which can cause this issue. You should contact your firewall service provider to get their rundown of IP addresses, and afterward, contact your web host to whitelist those IPs.

  • Check Error Log 

The 504-gateway timeout error may likewise be a reason for late website changes or updates. The speediest method to discover is by checking the error log for any clues. WordPress clients can empower error message logging by adding the accompanying lines to the wp-config.php file:

  • define( ‘WP_DEBUG’, true );
  • define( ‘WP_DEBUG_LOG’, true );
  • define( ‘WP_DEBUG_DISPLAY’, false );

When done, all produced sections will show up in the wp-substance/debug.log file.

504 Error Page
504 Error Page
  • Check Plugins 

While troubleshooting a 504-gateway timeout error, it’s prudent to glance through your website plugins and extensions. In WordPress, plugins identified with caching can be the offender. Obsolete or contradictory plugins may likewise cause issues. Thus, turning off every one of them briefly will inform you as to whether you’re landing in the perfect spot.

To disable all WordPress plugins, explore the wp-content directory and give the plugins folder an alternate name. In case your site works fine when all plugins are off, the following stage is to find which one causes the HTTP error 504. Rename the plugins directory back to its unique name and, this time, attempt to disable them independently.

  • Tidy up your WordPress Database 

A degenerated WordPress database may likewise trigger a 504 gateway timeout error. Try not to stress; your WordPress data is in all probability safe. Nonetheless, your database may require a little touch of spring cleaning. This can be effectively done by improving your WordPress database utilizing phpMyAdmin or utilizing a plugin like WP-Sweep. Ensure you back up the WordPress database before performing any activity.

At last, if all else fails, you need to contact your hosting provider for help. They might have the option to fix the issue or point you the correct way. Hopefully, this post may have helped you figure out how to fix the 504 gateway timeout error in WordPress.