Have you seen the 504 Gateway Timeout Error when entering your WordPress website? This error can prevent users from accessing your site. What makes it even more of a headache is that it may go away on its own and reappear if the problem is not resolved.
504 What is the gateway timeout error?
A 504 gateway timeout error occurs when the web site's master server, which handles the user's request to open the page, does not get a fast response from the upstream server.
The upstream server may be busy or handling high traffic, which causes delays. The section is too busy to respond in a timely manner.
You may also see a 504 gateway timeout error if you are using a site firewall and cannot connect to your WordPress web server.

The appearance and message of the error page varies depending on the proxy server or the Web browser used.
The following are some of the most common 504 gateway timeout error messages:
- 504 Gateway timeout
- HTTP 504
- 504 Error
- Gateway timeout (504)
- HTTP Error 504 - Gateway Timeout
- Gateway timeout error
- Connection timeout (504)
- The site is experiencing technical difficulties (504)
- Gateway timeout: server not responding in time
- Request timeout when connecting to upstream server (504)
Although the most common reason for the error is that the proxy server cannot reach the upstream server.
Let's take a look at how to troubleshoot the error and fix it in general when this happens.
1. Wait and reload the page
Sometimes, the 504 gateway timeout error code may just be caused by a connection issue on your WordPress server. Wait for a few minutes and then try reloading your WordPress site.
In some cases.Clear Browser CacheAnd refresh the page again to see if the error is still there.
If the problem goes away, that's fine. However, if the error persists or reappears after a period of time, continue troubleshooting and fix the problem.
2. Disable VPN
If a VPN service is used to browse the web, then try turning it off.

Sometimes, the VPN server may not be able to get a response from the WordPress server, which can result in a 504 gateway timeout error.
Refreshing your site and accessing it means that the VPN server is causing the problem.
If a certain country or region is blocked and you have to use a VPN to access it, then you can try switching to another VPN server. However, if you still see the error after switching servers, then you need to contact your VPN service provider for a solution.
3. Turn off the website firewall
If you are using a DNS-level website firewall (such as Sucuri or Cloudflare), temporarily disable the firewall. You can connect directly to the WordPress server.

If this solves the problem, then your server may be blocking firewall IP addresses, causing this issue. Contact your firewall service provider for a list of their IP addresses, and then contact your ISP to whitelist those IPs.
4. Disable Web Proxy
If connecting to the Internet through a proxy server, that server may not be able to get a response from your WordPress site.
Try accessing your site using a different Internet connection or a different browser. Or, use an online service to see if your site is down for just you or everyone else.
If you are the only one experiencing this, you will need to change your network connection settings. You can contact your ISP or network administrator to fix the problem for you.
5. Change DNS servers
An Internet connection uses a method calledDNS serverThe stuff. These servers help your computer connect to different servers on the Internet.
If there is a DNS problem, such as the server being used is down, you may see a 504 gateway timeout error. The easiest way to check for this problem is to change the DNS server that the device is using.
On Windows computers, this can be done by going toControl Panel "Network and Internet "Network and Sharing Center "Change Adapter Settingsto find them.
Then, click on your network, select "Change settings for this connection" and choose "Internet Protocol version 4" from the drop-down menu. You can now manually enter the DNS server address.

On Mac computers, this can be done by going to"Settings" "Network"Locate the DNS settings.
Click the Advanced button and select the DNS tab.

We recommend changing your DNS server address to 8.8.8.8 and 8.8.4.4 and applying the changes.
Try visiting your site again and see if the problem is resolved.
6. Clean up the WordPress database
A corrupt WordPress database may also trigger a 504 gateway timeout error. But don't worry, your WordPress data should very well be safe. However, your database may need some cleanup.
By using the phpMyAdmin Optimize your WordPress database or use theWP-SweepPlugins like this can easily accomplish this operation.
Note: Always backup your WordPress database before making changes.
7. Deactivate the WordPress plugin and switch to the default theme
WordPress plugins and themes are unlikely to cause a 504 gateway timeout error. However, if a plugin or theme makes too many requests to the server, some of those requests may break and trigger a 504 gateway timeout error.
To verify this, you can deactivate all of the WordPress PluginThe

Then, visit the website to see if the error has been resolved.
If yes, then one of your plugins is causing this issue. Now activate all plugins one by one until the error is reproduced. See which plugin is causing the error.
If disabling plugins doesn't solve the problem, then check your WordPress theme. Switch your WordPress theme via phpMyAdmin.
After switching your theme to the default WordPress theme, visit your site to see if it works. If it does, the problem is with your theme.
If all else fails, then considerUpdating your WordPress and PHP versionsThe
8. Closure of the content delivery network (CDN)
Content Delivery Networks (CDNs) can sometimes cause a 504 gateway timeout error. This is rare, but may occur if one of the servers in the CDN fails.
You can temporarily disable the CDN to see if this is true. This process will vary depending on the service used.
9. Check for PHP timeout errors
504 Gateway timeout errors can sometimes be caused by a low PHP timeout limit set on the server.
This limit essentially defines the maximum amount of time a script on the site must execute before it times out. If a complex script or database query takes longer than this limit, an error may be triggered.
I hope this article helped you guys. If it really doesn't work you can findOur Photonics TeamHelp you out!
Link to this article:https://www.361sale.com/en/16985
The article is copyrighted and must be reproduced with attribution.
No comments