How to Solve WordPress Internal Server Error

WordPress Internal Server Error

WordPress internal server error (HTTP 500 Internal Server Error) is a common problem. Of course, this error is not limited to WordPress. Any web program may have this internal server error. Today our focus is on the WordPress program. The figure below shows a typical 500 internal server error.

internal server error

 This article will cover these two issues:

  • Cause of 500 server error
  • 500 server error solution

1. Causes of 500 server errors

This is a headache because it does not return any information to the WordPress webmaster. There are several reasons for this problem. First of all, the non-standardization of .htaccess files (php + mysql environment) is one of the common causes of this error. Some WordPress webmasters often add a lot of things to the .htaccess file for various needs. After which there is the exhaustion of WordPress server resources. This is due to the limitations of the host itself and the increase in site visits. On the other hand, it is caused by tossing some plugins. Then there is the error of the function; Sometimes we add the wrong code to functions.php. The most typical is that certain code is incomplete (people who like to paste the code directly are the most prone to this error).

2. How to solve WordPress internal server error

The resolution to this delinquent is that “only blind methods can be used to touch the elephants and eliminate them one by one” (i.e. solving it gradually).

2.1 exclude .htaccess errors

The method is to log in to the host space via ftp and rename the “.htaccess” file to”.htaccess.bak”. Now try to log into the WordPress admin dashboard. If you can log in, it means that the internal server error is caused by this .htaccess file. Then go to Settings-Permalink, set a permalink, and regenerate a standard .htaccess file. If you still can’t log in, it may not be caused by this. But don’t modify it back temporarily, just in case it is caused by multiple reasons.

2.2 Increase PHP memory limit

This is a headache for everyone. It will be encountered when uploading images or logging into WordPress, or installing themes, or installing plugins. And these may directly lead to internal server errors. Solution to this problem is to increase the PHP memory limit. If you can control the server, find it in the php.ini file

memory limit = 64M; the determined amount of memory a script may chomp (64MB)

Some are 32M, alter this rate to 128M Unfortunately, webmasters often cannot control this, so we put out the last killer for WordPress. Why do we say this? Because this method is very effective

1) Create a new blank file and name it php.ini.

2) Open this file and enter: memory = 128M, if this does not work, use memory limit = 128M.

3) Upload this file to / wp-admin /

2.3 Rename plugin or theme

If the above can solve the problem, it means that a certain plug-in may have consumed your resources. So, the next best thing is to test for the plugin that consumes your resources. Therefore, rename the Original from “plugins” to “plugins.bak”, and create a new plugins directory. Next, gradually move the plugins in the original folder one by one to the newly created directory for testing.

If it is not a plug-in problem, transfer the target to the theme and name the original theme folder a different name to switch to the default theme.

2.4 Overwrite files

Another situation is that the system of WordPress itself has a problem for some reason. This is ignored by many people. So, this is suitable, download the same version of WordPress, and install it again. Don’t worry about modifying your content, because the settings are in the database, so the original settings will not be modified, and the data will not be lost.

2.5 Contact the host

If the above situation does not solve your problem, the last step is to contact your hosting company to see if the CPU value is too high. In short, the host can definitely get more information about the internal errors of the 500 server, such as server logs.

You May Also Like

About the Author: BW

Leave a Reply

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