Skip to content

How to fix 504 gateway timeout error in WordPress?

Fixing WordPress 504 Gateway Timeout Error: Step by Step

When we talk about WordPress, we cannot overlook the inevitable mistakes that can occur when managing a website. One of them is the 504 Gateway Timeout error. But don't worry, the solution is simple and in this article I will teach you how to do it. In accordance with good SEO practice, we will break the topic into segments to make it easier to understand.

What is the 504 Gateway Timeout error?

Error 504 is a server error message that appears when a server that acts as a gateway or proxy does not receive a timely response from another server. This means that WordPress cannot establish communication with the database server in time, leading to a timeout.

How to fix 504 Gateway Timeout error?

The solution to this problem may vary depending on what is actually causing it. Below are the four most effective methods to solve this problem.

1. Check your internet connection

As a first step, check that the problem is not on your end. Make sure your internet connection is stable and try refreshing the page.

2. Temporarily disable WordPress plugins

Sometimes plugins can cause a 504 error. To check this, you can temporarily disable all WordPress plugins and then enable them one by one to identify the problematic plugin. You can do this through the WordPress admin panel or via FTP by renaming the plugins folder.

3. Increase the time limit

One of the most common solutions is to increase the timeout. You can do this with the WP Maximum Execution Time Exceeded plugin. Just install and activate the plugin, and then increase the maximum execution time of the PHP script from its level.

4. Contact your hosting provider

If the above methods do not help, please contact your hosting provider. It may be possible that the problem is on the server side and your hosting provider will be able to identify and fix it.

Additionally, you can try the following steps:

  1. Increasing the timeout in the wp-config.php file: Add the following code to the wp-config.php file at the top of the file:
set_time_limit(300);
  1. Increase the timeout in the .htaccess file: Add the following code to the .htaccess file on your server:
php_value max_execution_time 300

Summary

The 504 Gateway Timeout error in WordPress may seem intimidating, but with the right approach, it can be easily fixed. First of all, check your internet connection, turned off

Check out the offer of 1500+ Premium WordPress plugins and themes!