Are you getting a 504 gateway timeout error on your WordPress site?
This error is an HTTP status code that are usually caused when a server is unable to connect to an upstream server to complete a request.
In simple terms, when someone visits a website, a request is sent to web servers that contain the requested elements. Then the server sends back an HTTP status code with the requested resource. This code is displayed when a server does not get a timely response from another server that acts as a gateway or proxy.
You are likely to encounter this WordPress errors more than other errors. In most cases, it will go away once you refresh your website. Also, you can also clear your website’s cache.
Some of the common messages you will get for 504 gateway timeout error are:
- 504 Gateway Timeout
- HTTP 504
- Gateway Timeout (504)
- 504 ERROR
- HTTP Error 504 – Gateway Timeout
HTTP 504 is one of the server-side errors and they occur when there is something wrong between the servers on the internet. But here are a few things you can try to troubleshoot 504 Gateway Timeout error:
- Disable Proxy Settings
- Deactivate WordPress plugins
- Turn off VPN
- Clean Database
- Disable Content Delivery Network (CDN)
- Check Logs
- DNS Propagation
- Server Issue
1. Disable Proxy Settings
A proxy server acts as a mediator for requests from clients seeking resources from other servers. There is a chance your browser is
If you are using Chrome as your browser, simply navigate to Settings. Scroll to the very last and click on Advanced.
Locate the System tab and click on”Open proxy settings option, then click on it:
Locate the System tab and click on “Proxy settings”. In the next window click on LAN settings.
Now all you have to do is disable the following options:
- Automatically detect settings
- Use a proxy server for your LAN
Save the changes and refresh the tab.
2. Deactivate WordPress plugins
It is very rare that 504 Gateway Timeout error is caused due to a plugin. But sometimes when there is a slow uncached request from a plugin it can result in delays.
To be sure that the problem lies with one of the plugins, you will simply have to deactivate your plugins. Remember not to delete but deactivate them, this will ensure you don’t lose any data.
To deactivate the plugins go to Plugins in your WordPress dashboard and click on “Deactivate”, next to the plugins name.
Disable the plugins one by one and reload the website after every deactivation. If the error is fixed after deactivating a specific plugin, that will be the cause of your problem.
Reach out to the developer or support team of that plugin.
3. Turn Off VPN
Sometimes VPN servers are unable to get a response from your WordPress hosting provider, which results in
Try to disable VPN service on your browser and see if the error persists. If VPN is the culprit you can try to either switch to a different VPN server or contact the VPN service provider.
4. Clean Database
In some cases, a corrupt WordPress database can also lead to 504 Gateway Timeout error. You can clean your database using the WP-Optimize plugin.
This will not affect your WordPress data saved in the database. But to be on a safer side, take backup of the database before performing any action.
5. Disable Content Delivery Network (CDN)
CDN helps load a site faster by storing static content on data centers around the world. Sometimes, there can be some issues with the CDN, which will result in a Gateway Timeout error.
If you are using a third-party CDN provider an easy way to troubleshoot 504 Error is to simply disable your CDN temporarily. You can consult the official documentation for specific instructions as every CDN works differently.
For example in Cloudflare CDN, just go to the Overview tab and locate Advanced Actions. Here you can Pause your website to disable the CDN.
Then check for 504 Gateway Timeout error in a new tab. If you are still seeing the error, re-activate your CDN again.
6. Check Logs
Many hosting providers offer an Error log to their customers. These will help you to figure out the issues, especially if it’s resulting from a plugin on your site.
To view your error logs on the Breeze.io dashboard, simply go to “Manage” next to your website name. Select logs from the above toolbar. This is how your error logs will look:
If in case your host doesn’t offer a logging tool, just add the following code to your wp-config.php file to enable logging:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
7. DNS Propagation
DNS Propagation is the time taken by Internet service providers across the world to update their caches with your new DNS information. If you have recently migrated to a new host, you will have to wait for almost 24 hours for your DNS to fully propagate.
This time can result in hours of downtime. You can check for this issue from a site called DNSMap. Similarly, enter your domain name and click on “Check DNS Propagation”.
If you see many red results, you will have to wait for your domain to finish propagating.
Although you can migrate from one host to another with zero downtime with our Managed WordPress hosting.
8. Server Issues
Server issues can be caused when Nginx or Apache is waiting on a response from something and it timed out. Other reasons that can cause server issues are:
- Slow Server
- Less no. of PHP worker
- Firewall issues
- Network connectivity issues
- HTTP timeout
All you can do is reach out to your hosting provider for support. If you are a client at Breeze.io simply contact us on support chat and our team will reach out to you in no time.
In future you can also use tools like updown.io, to monitor and notify you immediately when an error like this occurs.
It’s scary when you see an error on your WordPress site. Try not to lose your calm.
Simply follow all the steps we mentioned above and you will be able to fix the 504 Gateway Timeout error.
If your website is still showing 504 errors reach out to us for better support.