How to Fix a 500 Internal Server Error on Your WordPress site

How to Fix a 500 Internal Server Error on Your WordPress site

How to Fix a 500 Internal Server Error on Your WordPress site

How to Fix a 500 Internal Server Error on Your WordPress website-: Internal server errors in WordPress are the worst error in WordPress which is very difficult to identify and fix it. Internal server error does not provide real information about the problem. It is the error with your server not with your computer or internet connection.

To confirm 500 internal server error First try to clean your cache if you are using any plugin like WP super cache or W3 total cache. it could be possible you are seeing cache version of the page. after clean of cache if you are getting same error these mean 500 internal server error is 100% sure. In this post, I will explain how to fix the 500 Internal Server Error.

The 500 Internal Server Error is a very general HTTP status code that means something has gone wrong on the web site’s server but the server could not be more specific on what the exact problem is. on WordPress platform, Internal server error occurs if code execution of theme or plugin went wrong and that result crash of your server.

once you get the 500 internal server error first job is to see your error log. This log will display a list of error messages from your website. You will find detailed information about each error including the date and time of the error, some information about the client receiving the error, description of the error and information about which folder or file is generating the error. From this log, you can seek resolution depending on the information about the error that you receive. Log in to your hosting cPanel Scroll down to Metrics section and click on error icon.

How to Fix a 500 Internal Server Error on Your WordPress site

What is the 500 Internal server error and Hoe to Fix it.

1. Turn on WordPress Debugging Mode

How to Fix a 500 Internal Server Error on Your WordPress site

Whenever WordPress throws you a white screen of death or a server error, I recommend turning your debugging on. For more info on Word Press White Screen of Death Read my Post How to Fix WordPress White Screen Of Death (WSOD)

WordPress Debugging mode does not guarantee to fix WordPress Internal server error but it provides a more clear picture of what you have to fix.WP_DEBUG is a PHP constant (a permanent global variable) that can be used to trigger the “debug” mode throughout WordPress.

It is assumed to be false by default and is usually set to true in the wp-config.php file on development copies of WordPress. wp-config.php is one of the most important files in your WordPress installation is the wp-config.php file. This file is located in the root of your WordPress file directory and contains your website’s base configuration details, such as database-connection information. to locate your website wp-config file read my post How to locate your wp-config file.  one you located your wp-config file adds the following line of code to enable debugging mode.

define('WP_DEBUG', true);
When this setting is enabled, WordPress displays all PHP errors, notices, and warnings. When you are done, disable debugging mode by modifying the line in the wp-config.php file as follows:
define('WP_DEBUG', false);

If there is any plugin or theme issue this debugging mode will show it. if not follow the next step but keep debugging mode as it to know the issue but never forget to remove it once you fix the issue because it may provide a back door to the hacker to inject malicious code to your website.

2. Deactivate all plugins and switch themes

How to Fix a 500 Internal Server Error on Your WordPress site

If you are able to see your WordPress Dashboard deactivate all plugins and load your website. You can also use your hosting cPanel==>Public_html==>wp-content>Plugin to deactivate all your plugin, all you have to do is rename plugin folder. this will deactivate all your plugin and load your website again.

How to Fix a 500 Internal Server Error on Your WordPress site

if your issue got resolved. Go to your dashboard activate one by one plugin and find the culprit plugin which is causing the issue. The same thing you have to do with the Theme, first set your theme to default let sat twenty sixteen. activate the theme as a check. if your issue still exists follow the next step.

3. Check your .htaccess File-:

How to Fix a 500 Internal Server Error on Your WordPress siteThe .htaccess file, if it exists, contains a number of rules that tell the server what to do in certain circumstances. It is commonly used for rewriting URLs or preventing access to your site for malicious intent. Use your FTP editor and check if you have a .htaccess file in your WordPress root folder. You may need to make sure your FTP editor lists hidden files before you do this. If there is a .htaccess file there, make a backup and then delete all the contents within, or the whole file.

This may remove some important rules, but if the internal server error was caused by a mistake within the file, this will tell you. If the error is now resolved, the issue was with the .htaccess file. Try restoring the file and then deleting blocks of it. If at some point the site starts working, you know which block the issue is in. You can narrow it down to a single line like this usually. You can then remove that line or ask your developer or your host for further assistance.

4. Increase your Website Memory-:

How to Fix a 500 Internal Server Error on Your WordPress site

I’ve never personally run into this issue, but I’ve heard that increasing your memory limit may help – I assume this is more of an issue in shared environments. To get this done, open your wp-config.php file in the WordPress root directory and search for WP_MEMORY_LIMIT. If it exists, change the value to something like “64M”. If it doesn’t, paste the following line into the file:

define('WP_MEMORY_LIMIT', '64M');

If this works then you’ve only solved the issue temporarily. Chances are that you have a faulty bit of code somewhere (which could be a third party plugin) that is exhausting your resources. If your host has monitoring available, take a look at your resource usage with various plugins on/off to get a better idea of what is wasting those precious megabytes.

5. Ask your Host-:

How to Fix a 500 Internal Server Error on Your WordPress site

There are a few uncommon issues which can lead to internal server errors in WordPress, but at this point, it may be best to ask your host. The issue could be a genuine server issue, which they can at least confirm and they can also look at things like file permissions and other sources. Or, you might just want to switch to a better host that has servers that are more optimized to run WordPress sites. This doesn’t have to be expensive. There are hosts that give you an okay WordPress experience for as little as $0.8 a month.

6. Reinstall WordPress-:

How to Fix a 500 Internal Server Error on Your WordPress site

I shouldn’t think this would help in most cases, but there are some edge cases where a reinstall of WordPress could fix the issue. It may even fix file permission problems along the way. To get this done, I recommend following the manual WordPress Update instructions in the WordPress Codex.

Thanks for reading…“Pardon my grammar, English is not my native tongue.”

If you like my work, Please Share on Social Media! You can Follow WP knol on Facebook, Twitter, Pinterest and YouTube for latest updates. You may Subscribe to WP Knol Newsletter to get latest updates via Email. You May also Continue Reading my Recent Posts Which Might Interest You.

Share the Knowledge!
  • 160
  •  
  •  
  •  
  • 1
  •  
  •  
  •  
    161
    Shares
Amar Patel on FacebookAmar Patel on PinterestAmar Patel on TwitterAmar Patel on Wordpress
Amar Patel
Hi, I am Amar Patel from India. Founder, Author and Administrator of wpknol.com. I am a Simple Average Man who Loves life and Love living life.Professionally I am a Mechanical Engineer. Apart from my Job, I Love to write the things around WordPress WordPress CMS.
Enter your email address: Delivered by FeedBurner
Follow us on Social Media