How to Fix 500 Internal Error for your WordPress Site | AltusHost

How to Fix 500 Internal Error for your WordPress Site

How to Fix 500 Internal Error for your WordPress Site

Altus Host

Imagine a scene where you are visiting a site that is functioning perfectly, but suddenly gets so choked up and spits outs the internal server error.

Hm, we are sure you don’t really like seeing the 500 internal server error on your smooth WordPress site either.

The internal server error seems to be more common in WordPress as this type of an error does not really give out any other information which can frustrate the users and turn off from your website. This can cause some serious impacts on your site as the users start to move away from your site leading it to less customer engagement.  The WordPress is not an exception when dealing with errors as these sites experience variant types of errors depending on the problem they run into. Few of the errors are resolved by proper web development techniques in a day while others might take up to days for troubleshooting the problem. Let us know at some basics of how these errors can be resolved.

What is an Internal Server Error?

Before running into depth, we need to understand why your site such error. As the name depicts, the 500 internal error takes place on the server level when the server fails to show the requested page to the user. The error itself is an application-side issue that is occurring on your web server. So, when you try to write a specific URL into the address bar or click a link on a website, you actually request the server to show you a page.

In present times, due to some reason, the server cannot show you that specifically searched page which you’re looking for to signifies an internal server error. furthermore, we can also depict the internal server error in WordPress can be caused by the functioning of plugin or theme. This error shows up only when we try to access the admin area where the rest of the site works absolutely fine.

How can you resolve it?

Many of the times, it happens that you choose not to respond to those internal errors on your hosted server which might end up compromising your whole website. Hence, it becomes a very convenient option to back up your website data on your personal server to avoid any such rush. We have mentioned a few fixes that involve tinkering with your website under the hood by making a few specific changes to your website’s root directory. Therefore, it becomes very crucial to run a backup on your WordPress site for better protection. If you have not thought of any backup plugin or some other solution for an alternative then it is a high time to think about it.

For instance, you can consider some popular tools like BackUpWordPress, VaultPress, and BackupBuddy which are used by most of the WordPress sites for data backup. If you wish to backup your database as well, then you can go for WP Migrate DB Pro or WP-CLI for running quick safety reports. To troubleshoot a problem requires a lot of time and effort. But to fix it in a persistent way, one needs to identify the deep cause of the error occurrence.

Recheck .htaccess File

If your site is running on the Apache server, there are high chances to have your .htaccess file getting corrupted. Such a situation arises when you install a few plugins or make any changes to your site. It is an easy fix overall as you just need to replace your corrupted file with the new one.

All you are required to do is create a new .htaccess file for re-saving your permalinks settings in your WordPress dashboard. In case your site is running down, it does not allow you to log into your site and so one needs to rule out this option as you will need to use FTP or cPanel for accessing your site’s files. After that, locate your .htaccess file; it is recommended to create a backup of your name before you go to replace your previous .htaccess file before the new one. For this task, you need to rename your existing file so that WordPress stops recognizing this file. Try to refresh your site and if it loads properly then you got a hint that your .htaccess file has caused the 500 internal server error.

Rise up your PHP memory limit

When you hit up your PHP memory limit, there are possibilities to get the 500 internal server error. Such a situation arises because of the poorly coded plugins when a website makes use of a bunch of plugins or has some resource-intensive plugins. For this, all you need is to fix this issue by increasing the PHP memory limit for your site which can be done in different ways can do this which involves updating your .htaccess file, php.ini file, and wp-config.php file. It is advised to refresh your site to check out if it is working properly so you can see what the reason behind the internal server error is.

  • Firstly, search for your .htaccessfile in the root directory of your site and type the given line:
php_value memory_limit 256M

The given command line will help to increase the memory limit to 256 MB. But, if you cannot find it then make sure to be able to view hidden files or else paste the above line to create the new one.

  • Next, you will find your php.ini file in the wp-admin folder in your root directory to look for the line which starts with ‘memory_limit’. If it displays 64 MB or lowers then replace it with below line:
memory_limit = 256M

  • Even if updating your .htaccess and php.ini files do not work, you can still increase your memory limit from your wp-congif.php file by trying the below-given line.

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

  • Save all these above-created files and then try to refresh your site in order to check if it is working or not. Moreover, you can also have a suspicion for your plugins to push your PHP memory limits or get in contact with your web host about increasing memory on the server side.

Check your Plugins and File Permissions

Ever wonder how your plugins can also cause the internal error? The outdated plugins or the ones which are not updated on a timely basis can cause compatibility issues and also the new plugins seem to be coded poorly. Sometimes, it might happen that you receive an internal server error after installing a new plugin. To figure out if any of your plugin is causing you an internal error, you need to deactivate all the plugins on the same time and again reactivate them one by one.

Still, if you cannot access your WordPress dashboard or FTP into your server then open your wp-content folder to find our plugins folder by renaming it to effectively deactivate all of your plugins. Try to refresh your site and if it starts working then the cause of your 500 error is in one of the plugin. to identify which plugin is the culprit, rename your plugins folder and refresh all of them one by one until you get the threat.

When none of the above works, it seems to have the issue with the file permissions. The files in your WordPress directory should be set to 755 or 644 if they are accidentally set to 500 error. To check the file permissions, FTP into your server and check your site’s and check your site’s directory. The below mentioned things should be checked for file permissions that are recommended by WordPress Codex.

  • All directories should be of 755 or 750.
  • Check if all the files are of 644 or 640 with an exception being wp-config.php which can be set to 440 or 400 that prevents other users on the server from reading it.
  • Make sure the directories are never set to 777.

Contact your Web Service Provider

After trying all the above hacks, if you still get the internal server error; it is a better option to contact your web host immediately. As in the end, it is all your host’s server logs which are able to throw some light on what is getting the error to get it resolved. In such way, you can provide your host with a rundown of what you have tried to resolve your error which simply cannot get dismissed with your site’s files. This can happen if you are on a cheaply shared service provider.

There is not an exhaustive list of fixes which you can try out for fixing 500 internal server error. It is a frustrating issue which requires a lot of troubleshooting by trying out the above-mentioned hacks. We hope the tips and tricks in this article helped to fix your internal server error in WordPress. We do expect that a little change in web development techniques for your WordPress site can do wonders for your users. Happy Learning!

About the author: Vikash Chaudhary is responsible for campaign management and planning at a development company Tatvasoft.com. When he is not working he likes to write on new trends on development and design. He has got his bylines published in many big platforms bi Readwrite, Business2community & Many more.

Website | + posts

Recent Articles

Tags