How to Fix the 504 Gateway Timeout Error in WordPress?

Leestijd: 2 minuten

A 504 Gateway Timeout error is a common problem that can occur when your WordPress website does not receive a timely response from another server it is communicating with. This can be especially frustrating because it affects the accessibility and performance of your website. Fortunately, there are several steps you can take to diagnose and solve this problem.

Check Server Status and Load

Before diving deeper into possible solutions, it’s a good idea to check that the server is not overloaded or down. You can do this by:

  • Checking server status: Many hosting providers offer a status page where you can see if there are any general problems with their servers.
  • Check server load: If you can access the server through a dashboard such as cPanel, check for unusual spikes in resource usage such as CPU and memory.

Increase the Server Timeout Value

Too low a timeout setting can also cause 504 Gateway Timeout You can usually adjust this setting through your server’s configuration file or through your hosting management panel.

  • For Apache servers: Edit the .htaccess file in the root of your WordPress installation and add the following line: RequestReadTimeout body=20,minrate=500
  • For NGINX servers: You may need to change the fastcgi_read_timeout value in your NGINX configuration files.

Check for DNS problems

DNS problems can also cause a 504 Gateway Timeout. Make sure your DNS is set up correctly and that there are no problems with the DNS server.

  • DNS changes: If you have recently changed DNS settings, such as changing nameservers or adding DNS records, give them up to 48 hours to fully propagate.
  • Use DNS check tools: Tools such as MXToolbox can help you check for DNS errors or problems.

Check external services

If your website depends on external services (APIs, external databases, etc.), an error in one of these services can cause a 504 Gateway Timeout. Check the status of these services and, if necessary, test them by temporarily disabling or replacing them.

Contact Your Hosting Provider

If none of the above steps resolve the problem, it’s time to contact your hosting provider. They can provide deeper insights into what may be going wrong on the server and have the tools to address the situation more directly.

Not getting there or have more questions? If so, please contact o ns.

Receive more tips? Then subscribe to our newsletter .