Do you witness a 504 gateway timeout error on your WordPress websites often?
Sadly, users cannot access your website as a result. If you do not resolve the underlying issue proactively, it will appear and disappear frequently.
Read this article in detail to know how you can fix the 504 gateway timeout error on your WordPress website.
What does it mean by a 504 Gateway Timeout Error?
When the browser sends an HTTP request to the server and does not receive a timely response from another server to complete the request, it is called the “504 Gateway Timeout” error.
However, you can reload the web page to resolve this error accordingly.
How to Resolve The “ 504 Gateway Timeout” Error?
You should contact your web host first if you encounter the “504 Gateway Timeout” error. Moreover, you must check the statuses of your systems regularly.
Fortunately, you can try out numerous options that enable you to fix the 504 gateway timeout error on your WordPress website. Here are different ways you can use to achieve your objective successfully:
1. Refresh the Web Page
When you encounter the 504 error while browsing the web page or website, you should wait for a few seconds and then refresh the web page.
Surprisingly, you can avoid this error if it is caused by network or server load. Additionally, you can use different commands for a browser refresh, such as:
- Ctrl + F5 (Microsoft Edge)
- Command + Shift + R (Chrome on Mac)
- Ctrl + F5 (Firefox on Windows)
- Ctrl + F5 (Chrome on Windows)
- Command + Option + R (Safari)
- Command + Shift + R (Firefox on Mac)
If it is a cache or cookie issue, you can use a different browser.
2. Restart Your Devices
Interestingly, you can reboot your devices, including smartphones, computers, laptops, etc. By doing so, you can get rid of the 504 error hassle-free.
Furthermore, rebooting can help prevent your devices from any internal issues that may affect networking at times. In case the problem does persist, there is no harm in resetting your router, too.
3. Disconnect Your VPN Connection
VPNs do cause 504 errors sometimes. Therefore, you should disconnect your VPN connection if you see this error on your screens. Hopefully, you will not see the 504 gateway timeout on your screens again.
Moreover, you can change your VPN server to see whether your web page or website is loading properly.
4. Inspect Your Domain’s “Propagation” Status
If you move your website to a new host, the DNS settings may not propagate properly. Thus, your website visitors may experience the 504 gateway timeout error on their devices.
Any DNS change can take up to 48 hours to properly come into effect across DNS servers, and your website might be in that period.
Fortunately, you can benefit from a useful site, DNSMap, that provides you with the required information related to the status of any DNS propagation worldwide.
You can check the DNS settings alongside the name server set for your website by logging into your web host to see if your DNS change has been propagated. This check helps you rectify the 504 errors in a timely manner.
5. Check the WordPress Firewall
You can check the WordPress security plugin of your website to see if it has incorporated a firewall. You should check it first to see whether it is causing the 504 gateway timeout error.
Besides, you can check the plugins or temporarily disable them to bypass the 504 error. However, you can enable the WordPress security plugin in case the issue still exists.
6. Check newly installed WordPress Plugins
You can inspect newly installed WordPress plugins, including firewall and CDN plugins, as they can occasionally negatively impact your website traffic.
Hence, you must disable them and try to access the website or a web page again. This way, you can overcome the 504 gateway timeout issue.
Furthermore, you should remove the .htaccess file entry that your plugin has added. That’s because your .htaccess file may stop responses from your site to the proxy server. So, deactivating the WordPress plugin will also remove that particular .htaccess file entry.
7. Disable Your Site’s Content Delivery Network (CDN)
Website owners who use Content Delivery Network (CDN) may face a 504 gateway timeout issue. In simple terms, a CDN works as a network of servers that have copies of your website.
Additionally, CDNs help users access such servers globally. Despite managing the traffic of your website, CDNs may result in displaying 504 errors.
Therefore, you should disable your website’s CDN for a few hours. You can access your website again after a few hours to see if the 504 error is resolved.
8. Clean Up Your WordPress Database
Unfortunately, your WordPress website database can cause a 504 gateway timeout error if it has been corrupted for any reason. That said, you must create a backup of your WordPress database before you start cleaning it up.
You can take advantage of a reliable plugin, like WP-Sweep, that allows you to clean your WordPress database trouble-free.
9. Review Error logs
Reviewing error logs allows you to debug or troubleshoot the 504 error on your websites appropriately. Consequently, you can quickly identify and rectify the issue if it is caused by a specific plugin that uses too many resources.
To check the error logs on your WordPress website, add these below-mentioned lines to the wp-config.php file:
- define( ‘WP_DEBUG’, true );
- define( ‘WP_DEBUG_LOG’, true );
- define( ‘WP_DEBUG_DISPLAY’, false );
This way, you can enable error log messaging on your website. After enabling the error log messaging, you can click on the wp-contents/debug.log file to see all the generated logs instantly.
How Do the 504 Gateway Timeout Error Influence Your Website?
You should not take the 504 error lightly at any cost. Otherwise, you might face the consequences, such as low website traffic, higher bounce rates, lower search engine rankings, etc.
In reality, the 504 error negatively impacts your website’s performance. Your existing and potential visitors may not access your website on their desired devices.
If the same error is the result of a busy server, planned work, a fault, a data mismatch, or any other problem, your visitors will suffer the most because it is a complete loss of service on your site.
The 504 error can negatively affect your site if you do not rectify the issue proactively. If your website is crawled in the Google index when it is not reachable, there is a chance Google may delist your website.
Therefore, always keep an eye on the 504 gateway timeout error to avoid issues like lower search engine rankings and visibility.
504 Gateway Timeout Error Variations
As we use different operating systems and devices depending on our needs, we can see the 504 error on our screens in various ways.
Here are some common 504 error message variations described below:
- Gateway Timeout (504)
- This page is not working — the Domain took too long to respond
- 504 Gateway Time-out – The server couldn’t respond in time
- Gateway Timeout Error
- NGINX 504 Gateway Timeout
- The page request was canceled because it took too long to complete
- A blank white screen
- 504 Gateway Timeout
- 504 Gateway Timeout NGINX
One thing is common in all these above-described responses as they relate to the same 504 gateway timeout error despite using different wordings.
Fixing the 504 gateway timeout error on your WordPress site is a detailed process. Therefore, you have to perform several corrective measures like checking your DNS, disabling your VPN, deactivating your WordPress plugins, etc.
The underlying cause could be anything, including your web host or website. Thus, you should follow the solutions mentioned above in the desired manner to bypass 504 gateway timeout errors on a wide range of devices.