WordPress Error 500: Internal Server Error

WordPress Error 500
Shares

You see an HTTP 500 Internal Server Error message and don’t know what to do. Your WordPress has fallen apart. When did it happen? How long is your website offline? How many customers have you lost? Is the problem more serious? Maybe you lost all your data, plugins, themes, and content…? Relax and don’t panic. I will show you how to solve your problem.


Causes of HTTP 500: Internal Server Error

Let’s begin with a bit of theory. An internal server error (HTTP 500) is a web server-side HTTP error. The HTTP status code informs you that the web page you are trying to access has internal problems. It is a generic error, and you will see the error message when the web server is unable to pinpoint the cause. The website’s server did not find another 5xx error code that could explain to you better why the error occurred.

It is not a problem with the user’s computer or internet connection because the server is online. The server encountered a configuration data problem. To prevent the recurrence of the HTTP 500 Internal Server Error, a server administrator can try to explain the causes and provide a client with additional information in error logs.

Unlike other server errors that are a response to specific irregularities in (e.g., 404 error), HTTP 500 Internal Server Error is a general error hard to diagnose. There are several reasons why HTTP 500 Internal Server Error occurs. As the name suggests, it is an internal server error caused by the global configuration of the website:

  • redirects set in the .htaccess file;
  • faulty plugin;
  • theme not working properly;
  • out of the PHP memory limit on the server.

If you are looking for a more specific cause of HTTP 500 Internal Server Error, it could be caused by:

  • installing a new plugin (e.g., to increase security);
  • plugin or theme incompatibility with the version of WP;
  • too much load on the server (hosting);
  • invalid PHP scripts causing an internal error;
  • incorrect configuration of a plugin;
  • permissions errors;
  • WordPress update to the new version;
  • your website is too “heavy” (PHP timeout, heavy traffic, too many plugins).

Whatever the reason, we will find a solution!

WordPress is a simple and stable CMS, however, as in any script, errors can also happen here. Error 500 is not the only one that can occur. Learn the most common errors in WordPress and how to solve them.


500 Internal Server Error Solution

Let’s focus on three possible solutions to the problem of internal server errors:

  1. Restore the .htaccess file to its original version;
  2. Disable the plugins causing the error;
  3. Increase the PHP memory limit for WordPress.

Restore .htaccess file

Some plugins, e.g., security plugins, interfere with the .htaccess file. It is a PHP file containing commands for the server. If it contains mutually exclusive rules, the server will not be able to complete the task and will display a 500 Internal Server Error message.

The first thing you need to do is log in to your web server via FTP. You will find the .htaccess file in the WordPress installation folder. Check if there are more rules in this file than in the default one. If so, remove the redundant ones, and don’t worry if the HTTP error persists.

Perhaps it is enough to be patient now because the server may need up to several minutes to refresh the .htaccess rules. You can also try to clean the browser cache.


Permissions error

One of the possible reasons for a 500 error status code is that the file or folder permissions are incorrect. These permissions are expressed as numerical values. The value “755” (rwxr-xr-x) is the default configuration, and if you change it accidentally, you might get an “HTTP Error 500” message. It is possible that when you set all values to “755” the error disappears.


Disable plugins and themes that may cause 500 Internal Server Error in WordPress

Plugins and themes can cause WordPress Internal Server Error

Your task is easier if the 500 Internal Server Error is displayed only on the front end of your website, and you can easily log in to the WordPress panel. Nevertheless, I will provide you with a solution that will work even if you do not have access to the admin panel (when it also returns an error message).

I have access to the WordPress admin panel

In the first case, go to the panel, disable all plugins, and refresh your website. Has the 500 Internal Server Error stopped occurring? If so, there is a problem with one of the plugins. Enable them one by one, and before enabling each subsequent one, check if there is an error on the website. This method will allow you to find the culprit of the HTTP error.

The admin panel also displays a 500 Internal Server Error

In this case, use the same method – turning all the plugins off and enabling them one by one. The question is, how do you disable the installed plugins without access to the WordPress Dashboard? Login to your FTP or SSH server. Go to the wp-content/plugins and wp-content/themes folders and rename the plugins and themes folders there.

When WordPress detects that a plugin (or theme) folder has been renamed, it will treat it as a brand-new plugin. The new folder name can be anything you want. Changing the name of the plugins folder will disable them because WordPress will not find it. The plugin in the new folder (folder with a new name) will be detected as a new plugin and disabled by default.

If the site works after this action, you can start renaming the plugin folders back. If, despite renaming the folder, WordPress does not automatically enable the plugin, proceed as in the previous case – run the plugins one by one to find the culprit.


Increasing the PHP memory limit

As the number of visitors to your website increases, so does the server load because plugins need memory for their processes. The more visits to your website, the more processes plugins run. I will now tell you how to increase the limit of memory for your WP. Again, log in to FTP. In the WordPress folder, you will find the wp-config.php file.

Go to its editing. At the end of the file, insert the following code:

define(‘WP_MEMORY_LIMIT’, ‘128M’);

Try different settings: 128M, 256M, 512M. These are the values that indicate the limit of memory in megabytes. They are saved without B, i.e., 128M, not 128MB. However, you cannot change it indefinitely. Your hosting has its memory limitations, and you can’t overcome them.

It may turn out that this amount of memory is not enough for your site. Find out how much memory is allocated to your hosting plan. You can choose a hosting where you don’t have to worry about technical parameters. A specialist from a hosting company will transfer your website for free!

When your hosting plan offers too little memory, changing the limits in the wp-config file, e.g., to exceed the capacity of your server, will have no effect.

Meet one of the best WordPress, VPS and VDS Hosting providers: UltaHost. Read the UltaHost review by Web Hosting Secret Revealed


How to get more out of your hosting?

I will give you two more tips. Update your server’s PHP version. New versions of PHP bring many additional performance optimizations. Then it turns out that the same plugins and themes need less memory to work.

The second piece of advice is especially useful if you still use the shared hosting that you purchased as a beginner WordPress website owner because it was the cheapest hosting plan. Choose a new, experienced, and reliable web hosting provider. Efficient web servers will allow your website to load properly.

One of the best hosting providers is UltaHost. If you focus on WordPress and only have one website, choose WordPress Hosting. It is optimized specifically for this CMS. All settings and configurations are with WordPress in mind. The hosting panel is integrated with the WordPress Dashboard, so you can manage plugins and themes directly from the hosting panel, which is very convenient. And you will get a set of premium plugins and premium themes.

If your hosting needs to go beyond a single page on WordPress, buy a VPS and get rid of HTTP 500 Internal Server Error caused by PHP timeouts, busy restarting, a corrupted database or exhausted PHP memory limit, and other server-side errors once and for all.

A VPS will provide you with server resources for your exclusive use. You will receive the processor power expressed in the number of cores and RAM for your exclusive use. Thanks to this, you will have complete control over what is happening with your websites and applications. UltaHost also allows you to seamlessly scale your hosting plan. As soon as you run out of resources, you can instantly upgrade to one that meets your needs.


Conclusion

You already know that 500 Internal Server Error in WordPress is not a serious threat to your website. Just follow the tips, and everything will start working. Most importantly, it’s a configuration error, none of your site’s files have been corrupted or lost. All you have to do is find out the cause and get rid of it.

Nevertheless, remember to always make regular backups, especially when you install or update plugins that interfere with the website configuration or the .htaccess file. Also, take care of fast and properly configured hosting that will provide you with security, performance, and a good price.

If you enjoyed this article, then you’ll love UltaHost hosting platform. Buy VPS Hosting and get 24/7 support from our support team. Our powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the difference! Check out our plans!   

Previous Post
ssh vs ftp

How Does SSH Work?

Next Post
What is Offshore Hosting?

What is Offshore Hosting? Can Hosting Provider Ignore DMCA?

Related Posts
 25% off   Enjoy Powerful Next-Gen VPS Hosting from as low as $5.50