A 504 Gateway Timeout error occurs when a web server does not receive a timely response from another server that it needs to access while processing a request. This can occur due to a variety of reasons, including server overload, network issues, or a misconfigured server.

WordPress is one of the most widely used CMS today. So you don't have to bother looking for guidance if a problem occurs. In this article we will discuss the causes and how to fix 504 Gateway Timeout in full.

In addition, we have also discussed how to solve the most common WordPress errors in this article.

Cause of HTTP Error 504 Gateway Timeout on WordPress

The cause of the 504 error is because the server cannot respond properly to requests from the browser, or the request process is done for too long but the server does not respond.

These problems can also be affected by disruptions to internet service providers, distribution and use of unbalanced data access, network server errors on the Internet, insufficient PHP workers, HTTP timeout or internet connections on the computer you are using.

So, error 504 usually appears when the server cannot connect with the central server to complete the request.

Error messages that appear between one WordPress hosting provider are sometimes different, depending on the web server, proxy server, or WordPress server that is used.

On the webpage, the HTTP Error 504 message is usually written like.

  • 504 Gateway Timeout
  • HTTP 504
  • 504 ERROR
  • Gateway Timeout (504)
  • HTTP Error 504 - Gateway Timeout
  • Gateway Timeout Error

An error message that appears usually uses the statement "Gateway Timeout" or "Error 504" on the browser page.

How to Fix 504 Gateway Timeout on WordPress

The appearance of HTTP Error 504 Gateway Timeout sometimes appears due to an error in hosting configuration. So, not just waiting, there are some simple ways you can try to solve the problem.

Here are some ways to fix 504 Gateway Timeout on WordPress.

1. Clean the Cache and Perform Reload

Make sure that the problem does not occur in the browser. Because sometimes real problems don't occur on the hosting server or on the website, but on the browser itself.

Clean the Cache and Perform Reload

How to Fix 504 Gateway Timeout - Clean the Browser Cache

Try to clear the cache in the browser. Then make access again to the website you want to open.

If you can't, you can try several ways to fix 504 Gateway Timeout below.

2. Disabling VPN Connections

If you use a VPN ( Virtual Private Server ), you can try to deactivate it first. It could be that this problem is caused by the VPN server you are using that cannot connect to the main server where the website is available.

Disabling VPN Connections

How to Fix 504 Gateway Timeout - Disable VPN

If indeed there is no problem when connecting without using VPS. You can try replacing the VPN server with another one. If the problem reappears when using another VPN server, contact the VPN provider to ask whether there is a problem or not on the connection.

So you can also use a VPN to check whether the connection that is being used has a problem or not.

3. Disable Proxy

Besides VPN, sometimes connections that use a proxy can also cause HTTP 504 errors. You can try to disable the proxy server connection and try to use another connection.

If the problem does not appear, it is recommended that you contact the internet service provider (ISP) or network administrator who manages the network you are using.

4. Disable Firewall

If you use a firewall to access the website, try to disable it first. Sometimes a firewall connection makes you unable to access the website because it is constantly being rejected.

Suppose your website uses a CDN ( Content Delivery Network ) service such as Cloudflare. Try to disable the firewall settings in the configuration. You can also bypass the connection that you are using.

Disable Firewall

How to Fix 504 Gateway Timeout - Cloudflare

In VPS (Virtual Private Server) users, you can try to reset the firewall through the VPS management dashboard page. If it still can't, do the same, which is to disable the firewall on the VPS.

5. Disabling All Plugins

Sometimes some of the solutions above cannot solve the problem. But don't give up. There are several other ways that you can try to solve this problem, such as disabling all plugins used. How?

You can log in first to the hosting management panel. Then enter into file management ( file manager ). You can also use an FTP connection to access it.

Disabling All Plugins

How to Fix 504 Gateway Timeout - Plugins

On the WordPress directory page, point the active directory to the "wp-content" directory . In this directory there is a directory of " plugins " that contain all the file plugins that you use on the website.

Rename the directory plugins to disable all plugins directly. For example by changing it to " plugins_backup ". When finished, you can try to access again on the website page. If there are no problems, one of the plugins that you use is a problem in it.

You can also rename one by one the directories in the " plugins " directory to disable plugins one by one.

6. Change Themes to Default

If disabling the WordPress plugin doesn't solve the problem, try setting the WordPress theme to default. Because the website is not accessible, the way you can change the theme is through phpMyAdmin.

Change Themes to Default

How to fix 504 Gateway Timeout - Default Theme

Log in to phpMyAdmin, then navigate to the database used by the website. Then select the " wpoh_options " table . In this table there will be some information about the configuration on the website. Theme information is in "Page 2". Change the theme with the default theme : you can see the list of available themes in the " wp-content -> themes " directory .

7. Changing the DNS Server

When you try to connect with the website. Internet connection uses a DNS server to direct you to the destination website.

Sometimes HTTP 504 errors are caused by DNS servers unable to connect clients with websites. You can check whether the DNS is problematic by changing the DNS server that is used.

If you use Windows, you can enter the " Control Panel -> Network and Sharing Center " menu . Meanwhile, if using Ubuntu or other Linux operating systems can replace it through " Network -> Edit Connection ".

8. Cleaning the Database

How to fix the last 504 Gateway Timeout is to clean the database. The problematic WordPress database can also be a factor in the emergence of HTTP Error 504 Gateway Timeout. There is a possibility that this problem is caused by your database needing a process for cleaning.

This process can be done using phpMyAdmin or using plugins like WP-Sweep.

Don't forget to make sure you have backed up before running each process.

Conclusion

In this article, you already know how to cause HTTP Error 504 Gateway Timeout in WordPress and also how to fix 504 Gateway Timeout on WordPress. While some error resolution processes do not have to be sequential. So you can try randomly. Just adjust to the possible problems that might occur on the website.

Not only the correct configuration, but also need to use the best managed hosting to minimize errors in WordPress. So, you can choose to use a hosting service provider that offers more than 99% uptime and good support with Tier 4 Green Data Center.

avatar

Luke is passionate about fostering student involvement and connection. He studied psychology for his major and likes learning about the past. Luke aims to specialize in artificial intelligence and cybersecurity. .

Leave a reply

Your email address will not be published. Required fields are marked *