internal server error

How to Fix 500 Internal Server Error in Your WordPress Website

The 500 internal server error is one of the common WordPress errors. In this beginners guide, I will show your how to fix 500 internal server error in WordPress. These errors can be solved by following easy steps.

In this article, I will show you how to easily fix 500 internal server errors in WordPress.

What is the 500 internal server error?

When you try to visit a website, your browser sends a request over to the server where the site is hosted. The server receives this request, processes it, and sends back the requested resources (PHP, HTML, CSS, etc) along with an HTTP header.

The HTTP also includes a status code. The status code is a way to notify about the request. It could be a 500 status code which means something has gone wrong.

There are different types of status error codes (500, 501, 502, 503, 504, etc)and they all mean something different. These status error codes indicate that the server is an unexpected condition that prevented fulfilling the request.

The internal server error is not specific to WordPress, which can happen with any running website. It can also happen with WordPress theme and plugin functions. Other possible causes are corrupted .htaccess file and PHP memory limit.

Asking how to fix an internal server error is like asking a doctor how to fix the pain without telling them where the pain is.

What Causes Internal Server Error in WordPress?

The most common causes 500 internal server error causes by many things. 500 internal error may cause by the following issue:

  • Browser Cache.
  • Incorrect database login information.
  • Corrupted database.
  • Corrupted files in your WordPress installation.
  • Issues with theme and plugin files.
  • Corrupted WordPress core files.
  • Exhausted PHP memory limit on your server.
  • Corrupted or broken .htaccess file.

Variations of 500 Internal server error

Various web servers, operation systems, and browsers present this error in a number of different ways. But they are all communicating the same thing. Here are some different variations you might see on the web:

  • “500 Internal Server Error”
  • “HTTP 500”
  • “Internal Server Error”
  • “HTTP 500-Internal Server Error”
  • “500 Error”
  • “HTTP Error 500”
  • “500-Internal Server Error”
  • “500-Internal Server Error. Sorry something went wrong”
  • “500. That’s an error. There was an error. Please try again later. That’s all we know”
  • “The website cannot display the page-HTTP 500”
  • “Is currently unable to handle this request. HTTP ERROR 500”

Other times, you might simply see a blank white screen. 500 internal server errors is common in browsers like Firefox and Safari.

Don’t sweat, there are some good solutions…

Let’s take a look…

How to fix 500 internal server errors?

Most of the time you can fix the 500 internal server error by following those steps below:

Method 1. Checking for .htaccess file

At first, you should do when troubleshooting the internal server error in WordPress is check for the .htaccess file.

To check the corrupted or broken .htaccess file, rename your main .htaccess file to something like .htaccess_old.

To rename the .htaccess file, you will need to log in to your site using the FTP or File Manager app.

Once you connected your hosting accounts cPanel dashboard with FTP or file manager. You can see the root folder like public_html.

Open the root folder, you will see folders like wp-admin, wp-content, and wp-includes. You can also found the .htaccess file and rename the file.

Once you renamed the .htaccess file, try to visit your site. If the problem is gone, the issue was with the .htaccess file.

To create a new .htaccess file go to your WordPress dashboard. Click on the Settings, then go to the Permalinks page. Then click on the save button without making any changes.

This will generate a new .htaccess file.

Method 2.Check for Corrupted WordPress Plugin files

Sometimes your WordPress plugin an issue with internal server error on your website. You need to find out if your plugin is corrupted.

Using your WordPress Dashboard

To do this go to your WordPress dashboard click on the Appearance button. Then click on the Plugins button.

internal server error

You can see the plugin page and then deactivate the plugin one by one. If you find which plugin is corrupted, you should delete that plugin and reinstall that plugin from the WordPress directory.

However, if you don’t have access to the admin area of your WordPress site, then you can use your FTP Client.

Using your FTP Client

You need to connect your FRP client with the File Manager option in your WordPress hosting control panel.

Once connected, you need to click on the public_html folder and open it. You will see the wp-admin, wp-content, and wp-includes folder.

internal server error

Open the wp-content folder, you will see a plugins folder. Your installed plugins are stores in this folder.

internal server error

You need to right-click on this folder and rename this folder as ‘plugins_dactivate’. For doing this all of your installed plugins will be deactivated.

Using cPanel

Log in to your cPanel dashboard and open the File Manager menu, move to the root folder like the public_html file.

internal server error

 

Select the wp-content file and open it, you can see there are two files like plugin and themes file. Here you should change the plugin file name (like- plugins_disable). This will disable all your installed plugins.

If the error like the internal server error is gone, it means one of your active plugins was the culprit.

To find out which one, you can do this one by one renaming the plugin file name then return the plugins folder to its original name. Changing its name each time, then checking to see if the error goes away. Keep disabling plugins one by one until you fix the problem.

If your website is now loading fine, you have found the troublemaker. Now, you can fix the problem by reinstalling that corrupted plugin.

If none of your plugins are causing problems, it’s time to turn towards your active theme.

Method 3.Reinstall WordPress Core Files

The easiest way to fix this to replace all your core files with a clean and latest version of WordPress. To do this download the latest version of WordPress software from wordpress.org.

Once you get the file, which is a zip file. Unzip it and delete the wp-content folder in the downloaded files.

Using your FTP Client

Next, you need to connect to your WordPress website using an FTP client. Go to your site’s root folder. It is the folder that has wp-admin,wp-content, and wp-includes folders inside it.

In the left column open the WordPress folder on your computer, which is downloaded earlier.

Then you need to select wp-admin and wp-includes folders and then right-click and select the ‘Upload’ option.

Your FTP client will transfer those folders to your server. It will ask you whether you would like to overwrite the files.

Then select the ‘Overwrite’ option and select ‘Always use this action’ .

Your FTP client will replace your older WordPress files with newer and fresh copies.

Using your cPanel

To upload the clean and latest files, use your cPanel dashboard and navigate to your site’s root folder public_html folder. Next, upload all the WordPress files from your computer.

This process might take a while and you will need to say yes when you ask if you want to overwrite the files on your server. This process will also overwrite the .htaccess file.

When the process is done, go ahead and try to access your website once more.

Method 4. Increasing the PHP Memory limit

Sometimes internal server error can happen if your exhausting your PHP memory limit. Read this article on how to increases the PHP memory limit in WordPress to fix that.

If you seeing the error when you try to login to your WordPress admin area. You should increase the memory limit by following these steps:

  • Create a blank text file like php.ini
  • Paste this code in there:memory=64MB
  • Save the file
  • Upload it into your wp-admin folder using FTP client

If increasing the PHP memory limit did not fix the issue for you. You only solved the internal server error temporarily. You will in for some more troubleshooting.

I strongly recommend that you should contact your hosting provider.

Method 5.Check for Corrupted WordPress theme files

Sometimes your WordPress theme an issue on your website. You can easily find out if your theme is corrupted. You can be switching to a default WordPress theme like Twenty Nineteen or Twenty-Twenty.

Using your WordPress Dashboard

To do this go to your WordPress dashboard click on the Appearance button. Then click on the Themes button.

error establishing database connection

You can see the Theme page and then click on the Activate button of the default theme like Twenty Nineteen or Twenty-Twenty.

However, if you don’t have access to the admin area of your WordPress site, then you will need to use your FTP Client to switch the theme.

Using your FTP Client

You need to connect your FRP client with the File Manager option in your WordPress hosting control panel.

Once connected, you need to navigate to the public_html folder and open it. You will see the wp-admin, wp-content, and wp-includes folder.

 

Inside the wp-content folder, you will see a folder called themes. All your installed themes are stores in this folder.

You need to right-click on the themes folder and rename this folder as ‘themes _dactivate’. For doing this your installed themes will be deactivated.

WordPress will automatically activate the default theme like Twenty Fifteen or Twenty Sixteen.

Using cPanel

Log in to your Cpanel dashboard and navigate to the File Manager menu, move to the root folder like public_html file. Click on the wp-content file, you can see there are two files like plugin and themes file.

Now you should change the theme file name (like themes_deactivate). For doing this WordPress will revert to one of its default themes.

If your website is now loading fine, you can fix the problem by reinstalling the theme.

Method 6. Contact your Hosting Provider

If all methods fail to fix internal server errors on your website. It may be a genuine server issue.

Contact your web hosting support team. They will be able to check the server logs and locate the root cause of the error.

Conclusion

There are a lot of issues that can cause errors when connecting to your database. I hope you can fix the errors by applying those processes.

You may also want to see another guide on How to fix Error Establishing a Database Connection in WordPress, How to Fix “Briefly Unavailable for Scheduled Maintenance” Error in WordPress, and How to Fix 500 Internal Server Error in Your WordPress

If you like this article, please share this with your friends and more people.

Leave a Reply