500 Internal Server Error

While you are running a WordPress website, you may encounter with 500 Internal Server Error on your website. This error doesn’t necessarily mean that the webserver is only responsible for this. There may be several causes that prevent users’ browser to complete the requests of loading your website.

Today we will show you how to fix 500 Internal Server Error in WordPress.

Quick Steps:

  1. Increase the PHP Memory limit in WordPress.
  2. Check for corrupt .htaccess rules.
  3. Deactivate plugins that cause the error.
  4. Check file permissions.
  5. Upload the core WordPress files to your site.

1. Increase PHP Memory Limit

If your WordPress runs out of memory, you may face 500 internal error. To solve this problem, increase the PHP memory limit in WordPress. Go to cPanel File Manager and locate the wp-config.php file in your root directory (where your WordPress is installed). Right-click on the file and select the Edit button. Insert the following code below inside the opening PHP tag,

define(‘WP_MEMORY_LIMIT’, ’64M’); 
ini_set(‘post_max_size’, ’64M’); 
ini_set(‘upload_max_filesize’, ’64M’);

Save and refresh your website. If you still see the error message, that means PHP Memory Limit is not causing the issue. Remove the code that you inserted in the wp-config.php file and save the file.

2. Create New .htaccess File

Go to your cPanel File Manager and rename .htaccess file. If you can find the .htaccess file, you need to show the hidden file from the settings. Now create a new .htaccess file. Login to your WordPress Dashboard and go to WordPress Admin  >> Settings and select Permalinks. Scroll down to the bottom of the page and click the save button. This will create a new .htaccess file with the proper redirection rules for your site.

Go to the browser and check your website. If the error was caused due to corrupt .htaccess codes, it should be fixed. If you are still seeing the error, go for the next option.

3. Deactivate Plugins

500 internal server error can be caused by any WordPress Plugin. Login to cPanel  >> File Manager  >> public_html  >> wp-content and you will find plugins folder. Rename the plugins folder and this will deactivate all plugins. Now refresh your website. If the site loads fine, any faulty plugin is causing the error. Now put the folder name back to plugins. Now find the faulty plugin by deactivating one by one and after each deactivation, refresh your website. after finding the error causing plugin, remove it, and you are done.

Deactivate Plugins

4. Check The File Permissions

If the above methods aren’t solving the issue, check the file permissions. Permissions for the folders and files in your WordPress directory should be 755 or 644, respectively. Check if they have the correct permissions.  If they are anything else but 755 or 644, it can cause these 500 errors. To solve this, open up File Manager, go to the root directory, and right-click on the files/directories that have the incorrect permissions and click Change Permissions. A popup window will appear on which you can set the permissions to 755 or 644.

file permission

5. Update Core WordPress Files

This is the last method to solve the issue. Please backup your website before updating the core files. Download the ZIP file of WordPress installation from the WordPress website. Extract the file and find wp-admin and wp-includes folders from your fresh version of WordPress. Compress them to a ZIP file and upload it to the root directory. This will overwrite your existing wp-admin and wp-includes folders. Now your website should load perfectly.

If any of these methods are not working for solving the 500 Internal Server Error, contact your hosting provider. They will take care of the rest.

We hope this tutorial helps you find the perfect solution. If you like our tutorials, definitely you’ll love our support. All VernalWeb hosting plans include 24/7 support from our amazing in-house support staff. Check out our WordPress hosting plans and have your website migrated today!

  • Was this article Helpful ?
  • yes   no