5 Effective Solutions to fix 500 Internal Server Error in WordPress

Getting WordPress 500 internal server error after changing the URL? Or suddenly a site which was functioning perfectly well just seconds ago And now getting Internal server error. This is a common WordPress error you will encounter as a WordPress publisher. And the most common causes of this error are a corrupted .htaccess file and exceeding your server’s PHP memory limit. if you are the site owner, web developer, or WordPress publisher here 5 solutions to fix the 500 internal server error so that you can get your WordPress site working again as quickly as possible.

The 500 (Internal Server Error) status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.

Fix Internal Server Error In WordPress

Note: These solutions require making a lot of changes in your site’s root directory. It’s highly recommended you backup your site prior to trying any of these solutions in case something goes wrong.

Create a new .htaccess file

The most common causes of this error are a corrupted .htaccess file and exceeding your server’s PHP memory limit. The .htaccess file in your WordPress directory can become corrupted after you install a plugin or make another change to your WordPress site. The fix is simple. All you need to do is create a new .htaccess file on WordPress root directory.

  1. If you have Cpanel access open WordPress root directory from file manager tool,
  2. Or you can use third party software Filezilla to access WordPress root directory.

Rename .htaccess file.as “.htaccess_old”.

  • Let’s access File Manager right from the cPanel dashboard:
  • look for the .htaccess file in the root of your site.
  • Right-click it, and choose Rename:
  • Rename it to something like “.htaccess_old”.
  • Now, all you need to do is create a new .htaccess file to replace it.

rename htaccess file

Generate a new .htaccess file.

  • To force WordPress to generate a new .htaccess file,
  • go to your WordPress dashboard.
  • Then, navigate to Settings → Permalinks.
  • You do not need to change any settings.
  • Just click the Save Changes button,
  • And WordPress will automatically generate a new, clean .htaccess file:
  • That’s it! Hopefully, your site is working again.

Check if any faulty WP plugin causing the issue

If the problem not solved and still getting 500 internal server error the next thing that you can try is deactivating your plugins. Often plugin issues or conflicts can cause the internal server error. Especially if you saw the error immediately after activating a new plugin. And By deactivating your plugins, you can find the problematic plugin and remove it.

If you have access to WordPress Dashboard go to the plugin management area and use the checkbox to deactivate all of your plugins at once:

Deactivate WordPress plugins

And then reactivate them one by one and open web page after each. Hopefully, find the problematic plugin.

Deactivate WordPress plugins if you can’t access your dashboard:

if due to this 500 internal server error you can’t access your dashboard here follow steps below to deactivate plugins from the file manager.

  • Connect to your site via FTP or File Manager
  • Navigate to the /wp-content/ folder.
  • Rename the plugins folder to something like plugins_old.

Now try opening your WordPress dashboard, and if you are able to access it means the issue is one of the plugins.

  • Go to the Plugins section of your WordPress,
  • it will show the error “the plugin has been deactivated due to an error; plugin file does not exist.”Don’t worry.
  • Move to file manager, and rename the plugin folder from plugins_old to plugins.
  • Now from the WordPress dashboard, activate each plugin one by one.
  • After activating a plugin, browse 3-4 pages on your blog.
  • Repeat this step until you find a plugin whose activation causes the internal server error.

Switch to a Default Theme

If deactivating your plugins didn’t solve the issue, it’s likely your theme’s the culprit. You can verify this easily by switching to a default WordPress theme. I recommend using Twenty Sixteen, which is the latest default theme. If switching to Twenty Sixteen solves the problem, you can re-enable all plugins and get to work finding the issue in your theme’s code.

If your theme’s from either the official theme repository or an independent theme shop, you should let the author know as soon as possible. If, on the other hand, it’s your own theme, you’ll need to get a developer to help you out, because these bugs can often be very difficult to find — even for seasoned coders.

Increase PHP Memory Limit

Another potential issue is that your WordPress site is hitting its PHP memory limit. By default, WordPress tries to allocate 40MB of memory for single-site installs (as long as your host allows it). But if you’re experiencing difficulties, you can manually increase this limit (again, as long as your host allows it).

Access WordPress root directory via FTP or cPanel’s File Manager:

Look for wp-config.php file right click and select edit

Add the following line of code right before the /* That’s all, stop editing! Happy publishing. */ message:

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

increase php memory limit

Then save the changes by hit the save button. Or you can be reaching out to your host to support on this. Now check if this fix the 500 internal server error.

Reupload Core WordPress Files

If none above solutions work for you then try uploading a clean copy of the core WordPress files.

go to WordPress.org and download the latest version of WordPress.

Once the download finishes, extract the ZIP file and delete the:

  • Entire wp-content folder.
  • wp-config-sample.php file.

Then, upload all of the remaining files to your WordPress site via FTP. Your FTP program will show you a prompt about duplicate files. When this happens, make sure to choose the option to Overwrite duplicate files.

Hope one of these solutions has helped you fix the internal server error message on your WordPress site. If not we recommend ask your host’s support team to go through the error logs with you to pinpoint the issue.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More