How to Fix Internal Server Error on WordPress Website

It’s very weird that the 500 internal server error shows up on an unexpected time and you’re left confused how to get back to your WordPress website just like before. Although it’s common issue but it affects your website’s credibility and viewership. No one wants that for their business.

If you think it takes a very detailed and technical knowledge to fix the 500 internal server error on your WP site, you need to take a look at this post.

What is an Internal Server Issue?

Your web browser requests the website’s (you’re trying to access) hosting server to open the website. In response, the server provides the resources that the browser requested along with an HTTP header (including the status code). If the status code comes back with the 500 error it means that there’s an unexpected situation that stops the server to fulfill your request.

What to Do to Fix the 500 Internal Server Error?

The 500 error springs mainly on two ends due to different reasons, the first being on the client side and the second being on the server. Let’s resolve the both.

  1. Reload the Page

It’s a no brainer but we’ll mention it anyway. Whenever you encounter any issue with a website, be it the 500 internal server error, wait for a minute and refresh the page by using Ctrl + F5 keys or simply pressing the F5 key. You can also try opening the website in some other web browser.

  1. Check server logs

You can check error logs through WP debugging mode. Here, you can activate logging by entering this code to your wp-config.php file:

define( ‘WP_DEBUG’, true );

define( ‘WP_DEBUG_LOG’, true );

define( ‘WP_DEBUG_DISPLAY’, false );

  1. Inspect your Theme and Plugins

A corrupt, outdated, or unreliable plugin can also be the reason why you might be facing the 500 internal server error. To fix it, you can deactivate each plugin installed from an untrusted resource and change the theme for the time being and check whether the issue has been resolved. Once done, reactivate each plugin and theme one by one to check which plugin was at fault.

  1. Unable to Establish Database Connection

Database connection error is also one of the causes. This can happen due to many reasons such as a corrupted WP database, corrupted WP installation files, incorrect database login credentials, error on the web host end, etc. You need to check and fix these individually to resolve the 500 internal server error.

  1. Clean up Cache

Your browser cache must be outdated or perhaps there are too many cache files for the same website. It is recommended to clean up your browser cache to fix the 500 internal server error.

  1. Permission Error

It could be a WordPress files and folders permission error that’s causing the 500 internal server error. You can fix this issue by making sure these:

  • There should be no 777 given to any of the directories
  • Each file should be 640 or 644
  • Each directory should be 750 or 755
  • Set the wp-config.php to 400 or 440 so that only you can read the file

Fix these to resolve the internal server error.

  1. Reinstall your WordPress Core Files

Sometimes older websites face issues with their WordPress core. You can re-upload these files without affecting your theme and plugins. Just make your data’s backup first. Then, head to the Dashboard > Updates > Re-install Now. Once the process is complete, you will get fresh WordPress core files.

  1. PHP Memory Limit

An exhausted PHP memory limit can also be a reason. You can increase the limit on your own. We’ve described how to do it in the php.ini file.

  • Use FTP or SSH to log into your website
  • Head to the root directory
  • Open the php.ini file and look for the three settings to edit them
  • If you don’t have the file already, create one and paste this code

memory_limit = 128M

[Note: The values can be changed as per your preferences.]

If you have a shared host that requires you to create a suPHP directive in the .htaccess file first in the (same) root folder to make things work, do this by adding this code:

<IfModule mod_suphp.c>

suPHP_ConfigPath /home/yourusername/public_html


  1. A PHP Timeout

If the external resources to which your script connects time out, you can face a 500 internal server error. To fix this, modify your handling in your script.

  1. Check your .htaccess File

It’s not a common reason though, but you can still make sure the structure of the .htaccess file is proper. Do this by adding this code to the server:

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ – [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]


# END WordPress

You need to log into your website via FTP or SSH first and change the name of your .htaccess file to .htaccess_old. Now, create a new .htaccess file to paste the above code in it.

  1. Error on the Server End

Check with your host to make sure the 500 internal server error is not the result from an error on the server end. If yes, ask for an instant resolution.

Your Comment:

Related Posts



How To

How to Fix Syntax Error in WordPress: Syntax Error Unexpected

WordPress syntax error is a common error to see, especially if you’re a beginner. Just like other cases, WordPress too demands right coding. On finding a wrong one, it can’t process what it is supposed to. This is where you see a message on the screen saying, “Syntax error, unexpected…” In case you’re getting one, here’s a […]



How To

How To Fix WordPress RSS Feed Errors

Facing RSS feed issue on WordPress? Here’s a tutorial to help you resolve this issue and help your viewers get updates about your content. The RSS feed of your website make it easy for subscribed users to access your website’s content and everything related to it through a news reader app. RSS feeds use XML language and[…]



How To

How to Fix Image Upload Issue in WordPress (Quick Guide)

The image upload issue in WordPress is very common and you can resolve it on your own, no matter how much new you are on the platform. When you get this issue, you must be receiving errors such as a file size error or a WP HTTP error. In this post, we’ll help you know how to[…]