Are you facing the 504 gateway timeout error in WordPress and looking for a way to solve it? Here in this article, we will provide you the easiest and quickest solution to solve the 504 gateway error in your WordPress website.
When this type of error occurs, your users won’t be able to access your website. It will create a bad impression about your website and when the user can’t access your website, they leave your website instantly. It will increase the bounce rate of your website, which is also not very good for SEO.
Why did the 504 gateway timeout error occur?
The main reason for this error is to fail to connect with the upstream server. When a user lands on your website, the browser will send a request to access the page. If the browser is not able to connect with the upstream server, it will show this 504 gateway timeout error.
This happens when the proxy server is unable to make a connection to the upstream server. It’s the main reason, but sometimes the wrong configuration in your hosting account can cause this error too.
It will show you different error messages based on the hosting services you are using. Some of the common error messages are –
- HTTP 504
- 504 error
- Gateway Timeout error
- Gateway Timeout 504
Fix the 504 gateway timeout error in WordPress
Sometimes the error can happen for an instant glitch to your web server. If the error has happened for a temporary glitch, then you don’t need to do anything. Wait a few minutes and reload your website. If it was a glitch, then the error should be gone and no further steps are required. But you need to make sure that it was a glitch. Wait some time and recheck if the error appears or not. If it appears after a few minutes then you need to follow the next steps.
Disable website firewall
If you are using a powerful website firewall service then you need to disable the firewall services for a few minutes. The firewall doesn’t allow you to connect your server directly. After disabling it, you will be able to connect with your WordPress hosting server directly without any interruption.
Now check if the error appears or not. If the error is fixed, the firewall service IP may block your hosting server and that’s the reason for this error. To solve this conflict, you need to contact your firewall service provider to get their IP address list. After that, contact your hosting provider to unblock those IP addresses.
If you are using any Vpn service then you need to disable it. VPN service sometimes won’t be able to connect with your hosting server and cause the 504 gateway timeout error. If the error is fixed, the VPN is responsible for it. If using VPN is essential for you, then try to change the VPN service. If it’s not working then contact the VPN service provider and get their support.
Turn off network proxy
You need to disable your network proxy if you use any. Sometimes the network proxy server won’t be able to connect an established network with your WordPress hosting server. So you need to check your website is down only for you or everyone. Try to connect your website with a different internet connection. If your website is okay with other internet connections then the problem is in your network setting. You need to change your network settings to solve this.
Clean up the WordPress database
A Corrupt WordPress database is also responsible for this type of error. So you need to clean up your unnecessary file from your database. Don’t worry about your information and necessary data. You won’t lose anything. Before cleaning up your database, don’t forget to create a backup. There are many backup plugins available to make a complete backup of your website
Deactivate all plugins and switch to the default theme
Plugins and themes are less responsible for 504 errors. But if the themes and plugins create too many requests to the server, the error may happen. So you need to deactivate your plugin and switch to the default theme. Then activate the plugin one by one and check if the error is fixed or not.
To deactivate all the plugins you can use the bulk option. Go to Plugins-> Installed plugins and select all the plugins. Then, from the bulk option dropdown menu, choose deactivate and click on the Apply button.
To switch the default theme, go to Appearance->Themes, and then click on the active button to any of the default WordPress themes.
Following the process, you will be able to fix the 504 gateway timeout error in WordPress. You can see our other articles to learn
We hope this article will help you. If you like this article, please like our Facebook page to stay connected.