WordPress 500 error (Internal Server Error) indicates that the server encountered an unexpected problem while processing the request and was unable to produce the page. The message does not say the reason; The server error log tells the reason. The most common causes are corrupt .htaccess file, insufficient PHP memory, incompatible plugins and incorrect file permissions. When you check in the order below, you will see that the cause often appears in the first three steps.

Check the error log first

Open the Errors or Logs section in your hosting panel. The line at the time of the 500 error directly tells you the type of problem: "Invalid command" indicates .htaccess issue, "Allowed memory size" indicates out of memory, "PHP Fatal error" and a plugin path indicate plugin incompatibility. If you cannot access the log, click WordPress to open the error log. WordPress debug Follow the steps in our guide.

Reset .htaccess file

An incorrect rule added by a plugin or a manual change can corrupt the .htaccess file. name of the file .htaccess-eski and refresh the site. If the site opens, there is the problem. For a new, clean file, create the content with these default rules:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

RewriteEngine turns on the redirect engine. The next two conditions redirect the request to WordPress's index.php file if the requested address is not an actual file or folder. Pressing "Save" on the Settings, Permalinks page in the panel also rewrites this file.

Check memory limit of PHP

Heavy plugins and page builders may exceed the memory limit. to wp-config.php file define( 'WP_MEMORY_LIMIT', '256M' ); add the line. If your hosting company's server limit is below this value, the line will be inactive; In this case, increase the memory_limit value from the PHP settings on the panel. If the error persists after the limit is increased, still investigate which plugin uses this much memory, because unlimited memory increase will only postpone the problem.

Test the plugin and theme

Close all plugins at once by changing the name of the plugins folder in wp-content. If the site opens, rename the folder and find the culprit by opening the plugins one by one. If the problem persists, change the folder name of the active theme; WordPress switches to the default theme.

Fix file permissions

Permissions may become corrupted after the site moves or the server changes. Generally accepted values ​​are 755 for folders, 644 for files, and 600 or 640 for wp-config.php. Incorrect permission prevents the server from reading the file and causes a 500 error.

Cause and solution summary

Hint in the recordingReasonFix
Invalid command, RewriteRule.htaccess is corruptReset file
Allowed memory you exhaustedout of memoryIncrease the limit, find the heavy plugin
PHP Fatal error, plugins pathPlugin incompatibilityClose or update the plugin
Permission deniedFile permissionApply values ​​755 and 644
Timeout, max_execution_timelong processIncrease time limit, split transaction

The error occurs at night or on the weekend

The 500 error often occurs when no one is looking, after an automatic update or a traffic increase. For example, in a store that sends a campaign e-mail on Saturday night, the increased traffic exceeds the memory limit and all visitors see an error page until the morning. For such situations, monitoring the site from outside and receiving notifications in case of an error reduces the response time from hours to minutes. Even a simple operational status monitoring service gives the first warning.

Common mistakes

  • Trial and error without looking at the log: It takes hours; The reason for recording is usually stated in one line.
  • Deleting .htaccess without making a backup: Cache and routing rules are lost.
  • Making the permissions 777: It hides the error but creates a serious security vulnerability.

For 500 errors that occur at night or on the weekend WordPress technical support You can request urgent intervention from our page.

Does a 500 error Google affect my ranking?

A short-term error does not affect the ranking permanently. 500 responses that last for days may cause Google to crawl pages less frequently and drop them from the index.

What should I do if the error only appears on one page?

The shortcode, form, or page builder component running on that page is suspicious. Look at the line for the request for that page in the error log.

Where do I find the server error log?

It is located in the Errors or Logs section of panels such as cPanel and Plesk and in the error.log file of the web server on your own server.