Gateway Timeout Error or we can say 504 gateway timeout error in something that you might have seen in WordPress. The error is hard to understand and very few people will face this error.
Sometimes, the website will be working fine on some computers whereas it won’t be working fine in some cases.
Overview of 504 Gateway Timeout Error
We will first see why you are seeing this error in WordPress and what is the root cause of the error.
It’s simple. Sometimes, there is one barrier or a gateway that we use to connect to the WordPress server.
For example, if you are using a firewall for your WordPress website, the traffic or the request will first go to the firewall and then it will be sent to the WordPress server. If there is some problem in sending the request to the WordPress server then you will see this error.
Therefore, there could be many reasons for this error. Of course, one of them is the firewall about which will talk as we move on.
Here are several ways you will see this error.
- “504 Gateway Timeout”
- “504 Gateway Timeout NGINX”
- “NGINX 504 Gateway Timeout”
- “HTTP Error 504”
- “This page isn’t working – Domain took too long to respond”
- “504 Gateway Time-out – The server didn’t respond in time”
- “Gateway Timeout Error”
- “Error 504”
- “HTTP Error 504 – Gateway Timeout”
- A blank white screen
- “HTTP 504”
- “504 Error”
- “Gateway Timeout (504)
So, if you see anything from the above-given text, it is the same error and it will be solved using the same technique.
Fix 504 Gateway Timeout Error in WordPress
We will now see the steps on how you can fix the 504 gateway timeout error in WordPress. There are various ways to fix it, we will see some of the common ways that will fix the error.
Specifically, there are ways you can fix it. One is where we will make the changes in our computer or the device we use. The next one is on the server-side.
One of the things to keep in mind here is that when we make any changes to the server, it is crucial to have a backup of the WordPress website. Thereafter, make sure you have a backup of your website. Once you have a backup of your website, you can continue with the methods and see which one works for you.
Proxy and VPN
If you have tried to reload the website again and still the website isn’t loading, you can check for the proxy or the VPN.
Let’s talk about proxy first. You can see if you are behind any proxy server. For that, you can see your browser settings. Head over to the proxy settings and make sure that it is the default. If not, you can remove the proxy server and try using it again.
The next thing applies to the people who are using VPN on their computer devices. If you are using any VPN, you can try disabling the VPN and try reloading the website. In most cases, this will do the job.
When you are behind any proxy or VPN, chances are that proxy server isn’t working which is giving you issues. So, if you disable it, you can see if it is working or not. If it is working the VPN or the proxy might be the issue.
Further, you can try different devices to see if the website is working or not. You can also try changing the network. For example, if you are using a wifi network, you can try connecting to a different wifi network or you can also try a mobile hotspot.
You can also check the website using the down detector tool available on the internet. Just enter the website URL in the space given and it will tell you whether the website is down for you or it is down for everyone. If it is up for everyone then there is surely some issue with your computer.
You can try clearing the cache memory and try again. The easy way will be to check the website in incognito mode and see if it is working or not.
DNS stands for Domain Name Server. If the DNS of the domain name is not given properly, it might cause an error. So, your next job is to fix the issue with DNS.
If you have recently changed the DNS, you can recheck it to make sure that they are correct. If you have added the wrong nameserver or wrong time, you could see this error. Therefore, your job is to make sure that the error is not caused by the nameserver.
It is always better to check the nameserver and all the other DNS entries to be sure about it.
Further, if you have just changed the DNS, it is advised to wait for at least 48 hours. Sometimes, DNS propagation can take a long time to see. Therefore, you can wait until the issue is over.
There are tools available to check it. You can use tools like DNSMap to ensure that the DNS has propagated successfully. It checks the website from multiple locations to ensure that the DNS is working. If you see the wrong DNS in the tool, it means that you will have to wait more time until the issue is fixed. Therefore, it is highly recommended to check this before doing other things.
Sometimes, it can also be due to your computer’s DNS. So, you will have to clear the DNS memory in your computer and try again to see if it is working or not.
To do it, you can run a simple command and that will do the job for you. Open the command prompt and enter the following line. Make sure you have opened the CMD as admin.
Try opening the website to see if it works or not.
WordPress Firewall and Security
One of the reasons for this error is the WordPress firewall. By default, WordPress doesn’t provide any firewall or any security plugins. You can surely add the plugins on your own from the huge WordPress directory. This is where the problem begins.
If you have installed one of the security plugins in the WordPress directory, that might be the issue. So, you will have to deactivate that plugin to see if it works or not.
You can simply head over to the file manager from your cPanel and go to the wp-content folder. Inside it, you will see the folder named plugins. You can open it and rename the security plugin. You can rename it to anything.
Reload the website to see if it is working or not. Renaming the file will deactivate the plugin. So, once you deactivate the plugin, the website might work properly. If it is working, the plugin was the issue.
It is surely not the plugin’s fault always because sometimes the wrong configuration might also be the reason for this. Therefore, you will have to make sure that you have configured it in the right way. You can check out the documentation of the plugin to know more or you can install the plugin again and reconfigure it.
Disable the CDN
The CDN might also be the reason for the 504 gateway timeout error. To fix it, you will have to disable the CDN. If you are using the CDN, you can try disabling the CDN for a while to see if it is working or not.
You can disable it with ease. In most cases, there will be a plugin to do all the things. You can deactivate the plugin and try reading the website again. If it doesn’t work, we still have one method pending. So, you can surely try that one and see if it will work or not.
If there is some issue with the server, the website won’t load properly and will show a 504 gateway timeout error. So, you can try seeing the hosting status to see if it is working or not.
You can surely contact the hosting provider. The hosting provider will fix the issue if there is some problem from their side. However, if it is not from their side and it is from your side, they will tell you what needs to be changed. You can then follow the same method suggested by them to solve the issue.
Therefore, don’t hesitate to contact the host. They have a solution for every problem. They will solve the issue in no time.
To conclude, these are some of the ways you can fix the 504 gateway timeout error in WordPress. Make sure you take the backup before you make any changes. This will make sure that the changes you are making can easily be rollbacked. If you are making changes to your computer, make sure you know the path of what you have done. So, you can rollback the changes.