How to Fix 500 Internal Server Error in WordPress?

We are here to give you a general overview of what 500 internal server error in WordPress is and how to fix it all by yourself while walking you through server easy to follow steps.

The 500 internal server error is one of the fear generating HTTP status codes. It sends you signals that something went wrong with the server supporting your website.

If one day you discover 500 internal server error on your WordPress based website, don’t panic. There is an effective antitoxin for absolutely any kind of WordPress – related error, and HTTP 500 internal server error is not an exception.

Before passing on the steps to fix this error, let’s understand the origin of it and how you are faced with it. The bare truth is that it is not always caused by WordPress itself. There are also other server issues as well.

When you write your WP website URL in the bar or click on the link of your site, you instruct the server to show you the relevant page. However, for some specific reason, the server is not able to satisfy your request and instead shows you an internal server error.

fix 500 internal server error WordPress

Before passing on the practical ways to fix 500 internal server error in WordPress, we insist upon to creating the backup of your site on your server, you that you don’t suffer from your web date loss in some emergency situations.
internal server error
In case you are faced with this unpleasant error and wonder how to fix 500 internal server error in WordPress, continue to read this article. Here you’ll find the best guidance to handle the situation in the right way and without any unexpected losses.

1. Checking for the corrupted .htaccess file and creating the new one.

The error showcased on your PC screen will never tell you anything about where the problem occurs from. Anyway, irrespective of its cause, the first thing to do when you are faced with this error is to check for the corrupted .htaccess file.

It is one of the main causes of 500 internal server error and needs the replacement of this file with a new one. This can recover the functionality of your site and kick it back into gear.

Now, you need to move to cPanel, Files, File Manager and go to the directory hosting your site. Find the Settings button at the top and make hidden viewable. Once you are done, click Save.

Find .htaccess file and rename it into something other like .htaccess.bak or .htaccess.old. This method will delete .htaccess file. It means you need to create the new one. Go to WP admin dashboard, Settings, Permalinks and save changes.

Now let’s try opening your website again. If everything is ok, it means that the reason was the corrupted .htaccess file. If the problem still exists, you need to consider other cases as well.

2. Increasing PHP memory limit in WordPress.
php limit increase
Trying to fix 500 internal server error in WordPress can lead to success if you increase the PHP memory limit.

Your WordPress and host initially define PHP limits for uploading photos, images, videos and other files. However, the plugins and scripts exercised on your WordPress powered website need PHP memory in order to work properly on your site.

Otherwise stated, those plugins and scripts need the assistance of PHP limits in order to load and function. So, when this default limit is reached, your server will automatically showcase 500 internal server error.

Basically, what you need to do in this error troubleshoot process is to increase PHP memory limit and easily get back to your WordPress website’s usual functionality.

There are several checked and trusted ways to undertake and increase the required PHP memory limit. You can do that by updating php.ini file, .htaccess file, wp-config.php file, as well as functions.php file.

As for the php.ini file, use your cPanel, Files, File Manager. Select to showcase hidden files and select wp-admin folder to find php.ini or php5.ini file. If it is missing, click New File button to create the one. Name that new file as php.ini and press on to Create File.

If the update with php.ini file does not give the needed result, try to edit .htaccess file while going to your root directory and finding that file. Download it to your computer, open the file in your preferred text editor program, and insert the following pieces of codes under the initial PHP tag:
php_value upload_max_filesize 64M
php_value post_max_size 64M

As for the wp-config.php file, the principle is the same as in the case of the previous .htaccess file. You can find it in the root directory, download it to your PC, open a file in editor and paste the following codes:
define(‘WP_MEMORY_LIMIT’, ’64M’);
ini_set(‘post_max_size’, ’64M’);
ini_set(‘upload_max_filesize’, ’64M’).

At last, use the trick with functions.php file. The path is just the same as in the above mentioned cases through root directory, finding the needed one, opening the editor and this time including the following:

@ini_set(‘upload_max_size’ , ’64M’);
@ini_set(‘post_max_size’, ’64M’);
@ini_set(‘max_execution_time’, ‘300’).

3. Deactivating all plugins
Sometimes deactivating all your plugins at one will solve the problem. In certain cases, a specific plugin can be the hotspot of the error. In other cases, it can be caused by the improper cooperation of different plugins.

However, it’s not always obvious which plugins are “guilty”. Under such circumstances, you have to try deactivating all the plugins simultaneously.

If this method fixes 500 internal server error in WordPress, then you definitely know that the reason is one of the plugins. Try to reactivate each of them until you meet the one causing all the trouble. Remove that plugin to escape future errors.

You can go ahead and try another option if your efforts were in vain with the above stated methods. If all the above cases are a no go, try to reupload core files, mainly wp-admin and wp-includes folder. This can be the possible solution for you.

Whenever the file is facing any problems than the 500 internal server error in WordPress will be shown on all the pages of the website.

This means that there is some problem with the server or the file system which is providing power to the website. The major problem comes down from the directory where the files in the WordPress are stored but the problem could also be coming from the host server.

Whenever the error occurs it could be one of the most frustrating things in WordPress. Now since the reasons for the problem could be a lot the solution also is not just one. The ways to fix 500 internal server error in WordPress are thus more than a few each depending on the reason why it occurred in the first place.

One must, however, realize that it will require a high amount of patience while dealing with the solutions hence time limitation might not work here.

Now the reasons could be ample hence a lot of efforts will have to be made to find the real cause. You can try the below-mentioned one to fix 500 internal server error in WordPress.

Debugging: If you are facing problems finding out what is causing the problem on the site then you might want to check the WordPress built-in debugging feature.

This is not a very tricky business a simple pasting of the code into the website will do the job, paste wp-config.php file which will debug the site. A file will be created with all the errors which are recorded.

File permission: This is not majorly the reason but still there is no harm in checking. Check the WordPress directory, permission for folders.

The files 755 or 644 if set at permission to anything may create a problem. Now to change that g to each file in the root directory permission tab and check. There should be no other permission than 755 or 644.

Using a fresh version of WP-admin and wp-inlcudes: This could be counted as the last resort when nothing else works. When you have tried almost everything which has been suggested yet cannot reach where you desired then this is where it should end.

Make sure that the site s backed up before this and then you can download a fresh version of the main website’s version. If you see that the error is gone with refresh then it is likely that there was a corrupted file. If there is still error then the only option left is to take help from the host.

An Assistance of the host: When all other options have been tried out the host can help you with the solution but this should always be the last step when everything else has been tried.

This is required as there are many third-party and host service which is building the site and hence every step is required so that the host is not solely blamed for something they cannot manage or handle.

The error could be frustrating and time-consuming but the solution in most cases is simple once you reach them.

About Sonnal S Sinha

Sonnal S SinhaSonnal S Sinha is a passionate writer as well as WordPress and WooCommerce rockstar who loves to share insights on various topics through his engaging blog posts. He run successful website design and digital marketing company. With 15+ years of experience in WordPress themes development, he strives to inform and inspire readers with his thought-provoking content. He helps thousands small and medium businesses and startups create a unique online presence. Follow Sonnal S Sinha for your regular dose of knowledge and inspiration.