Home Tech Trends How To Fix 500 Internal Server Error In WordPress

How To Fix 500 Internal Server Error In WordPress

The 500 Internal Server Error is a server-side error, meaning the Challenge probably isn't with your computer or internet connection but instead with the WordPress website's server.

500 Internal Server Error Solution

500 internal server error is a frustrating issue as it doesn’t always have a clear cause or a clear solution. It requires a lot of troubleshooting. In this article we shall show you how to fix and troubleshoot the error very easily.

How to Solve Error 500

How to 500 Internal Server Error

#1. Fix .htaccess file

Most commonly 500 Internal Server Errors occurs due to misconfiguration of '.htaccess' file. 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.

So, you may want to rename it like '.htaccess_re' or delete it straightforward to create a new one. Connect and open your WordPress root directory in your preferred FTP client. Usually, this folder is present in public_html folder of your file manager. As it is a hidden file you need to select the option called show hidden files in settings of your file manager. Check the permissions for '.htaccess' mostly it is 644.

To create new .htaccess, log in to your WordPress admin dashboard. Navigate to Settings , and select

Permalinks and click Save Changes .

Now you can enter your website's address and open on a browser. If the error is gone, then its as a result of a corrupted .htaccess file but if not, try out the subsequent solutions to 500 Internal Server Error in WordPress.

#2. Increase php memory limit

Plugins, scripts, and themes often utilize huge memory. PHP memory limit issues often occur as the result of a poorly-coded plugin running on your site or a site that’s grown considerably over time and is using too many plugins. You’ll begin to exceed the PHP memory limits set by your hosting provider once either of these things happen. The result is a 500 internal server error.

You need to increase your PHP memory limit in WordPress and refresh your site to test whether or not this is causing your 500 internal server error. To do this, you can opt in for series of method explained in "how to increase PHP Memory limit in WordPress".

Connect to your FTP Client, open your root directory, and locate your

wp-config.php file. Right-click on the file, and select Download to Download it to your computer. Open the file in your preferred text editor, and add this bit of code under the opening PHP tag:

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

Save the file, and re-upload it to your root directory, overwriting the original file. 

Or better still, you need to do is to add following line of code " memory_limit = 200M " in your php.ini file present in your home directory.

#3. Incompatible PHP version

In case you are using PHP version above 5.3 and your .htaccess file consists of "register_globals = on" line you need to remove it and reload your site. As register globals only support till PHP version 5.3.

#4. Faulty Plugins

Another reason for 500 Internal Server Error, it may cause due to WordPress plugins. If you are getting this error after activating any new plugin, I recommend you to deactivate the new plugin and reload your website.

Therefore, if you cannot access the WordPress dashboard. Here you can use FTP or cPanel to navigate to the ‘plugins’ folder to the wp-content folder.

Rename the ‘plugins’ folder (may be plugins_old). Reload your website after activating all plugins one by one. Reload your website and check if 500 Internal Server Error is gone or not. If not, there is some other cause of this error. Then, read further.

Make sure you rename the folder back to “Plugins” afterward.

#5. Poor-coded WP Themes

This same procedure implies for themes. Make use of an FTP client or cPanel. Now, open the ‘ themes’ folder and rename the folder containing all files which access the theme which is activated.

This will deactivate the current theme and the default theme will be active automatically. Reload the website. If you still see that error message, nothing is wrong with the theme.

6. Re-upload wp-admin and wp-includes folder

If your WordPress core files corrupted, then you need to re-upload a fresh version of wp-admin and wp-includes folders from a new WordPress installation. As the wp-content folder remains untouched.

Backup your site, and Download a fresh version of WordPress from the main site.

Extract the files from the ZIP file, and open the extracted folder. Open your site’s root directory in an FTP client, and upload the wp-admin and wp-includes from your fresh version of WordPress to your site’s directory, overwriting the older versions.

Refresh the client, and refresh your site. If the error is gone, it was likely caused by a corrupted core file. If you still see the error, you may have no other option than to contact your host.

#7. Seek Your Host's Assistance

If you’ve gone through all of these steps and still cannot find a solution, your host may have it. It is, however, important that you go through these steps to ensure the issue is not occurring in your root directory.

Otherwise, contact your web hosting provider to help you sort it out. Then you will be fine.