How to Fix 500 Internal Server Errors on WordPress Websites

WordPress has over 75 million active websites today, which makes it one of the most popular website publishing platforms around. Although it’s user-friendly and fairly simple to use, it’s common to run into something known as an error code 500.

Keep in mind that this isn’t just an issue WordPress sites face – any website that’s running on a web server can run into the problem. It’s a very generic issue that doesn’t exactly tell you what the problem is or how you can fix it.

If you’ve seen a pesky WordPress internal server error pop up, don’t panic just yet. We’re here to help you understand what the 500 internal server error is, how you can address it, and how to prevent further issues with your site.

What Is the 500 Internal Server Error?

Let’s first understand what the 500 Internal Server Error is.

A fairly general HTTP status code, the 500 Internal Server Error indicates that something unexpected has happened on your website’s server. If you see this error message, there’s no need to panic. The problem, whatever it may be, is with your website’s servers, not your computer.

Here’s the catch though, the server can’t tell you what the exact problem is. It only shows the response code 500.

This is why you often get an error message like this:

Wordpress - 500 Internal Server Error

Naming Variants for 500 Internal Server Errors

There are actually quite a few names or phrases that can indicate you’re dealing with a 500 internal server error. Depending on your web server or the particular problem, you could receive any of the following variants:

  • 500 Internal Server Error
  • Internal Server Error
  • Error 500
  • HTTP Error 500
  • HTTP Error 500 – Internal Server Error
  • Temporary Error (500)

Some websites may also use funny images and messages.

Here’s one such example:

Error 500 - Message Displayed Using A Funny Image

What Causes the “Internal Server Error” Message?

Usually, a 500 Internal Server Error means, the problem is with the site’s servers, not your PC or internet connection.

A variety of causes can result in a 500 Internal Server Error.

Typical causes include:

  • A corrupt ‘.htaccess file’
  • Exceeding your PHP memory limit
  • Having improper file permissions
  • Corrupt WordPress core files
  • Plugin or theme malfunction.

Sometimes, you may also encounter error code 500 when accessing the admin area. But, the rest of the website will continue to work just fine.

How to Fix the 500 Internal Server Error

Although it is a server-side error and can mean anything, you can still fix this problem.

But, troubleshooting this WordPress HTTP error requires time and patience.

Let’s start.

a) Create A Backup

First, you need to create a backup of your site as you will be making changes to its root directory.

If your web hosting provider offers website backup, use it. But, it is better to create a back up of your own.

You can use a WordPress backup plugin such as BackUpWordPress, VaultPress, and BackupBuddy.

If you don’t have it already, it’s time to get one.

b) Know How To Use An FTP Client

You will also need to know how to use an FTP Client.

You can also use a File Manager. However, an FTP client is faster, customizable, robust, and easier to use.

An FTP client is a tool that allows you to access and edit your website’s server files.

FileZilla is the most popular FTP Client. It is open-source software.

However, you can use an FTP client of your choice.

c) Troubleshooting Options

Now, let’s take a look at a few general troubleshooting options to remove the WordPress internal server error.

1. Create a New ‘.htaccess File’

  1. Using the FTP client, open your website’s root directory called public_html.
  2. You should be able to see files named wp-admin and wp-content.
  3. If not, click on the Server tab, and select Force Show Hidden Files option to view the hidden files.
  4. Find your .htaccess file, and right-click to rename the file as .htaccess.bak. It will delete the old file.
  5. Now you need to create a new file.
  6. Go to Settings → Permalinks.
  7. Scroll down and click the Save Changes button. Don’t make any changes.

You are done!

The .htaccess file handles the configuration of your web server. If the 500 internal server error was due to this configuration issue, creating a new .htaccess file will resolve it.

2. Expand Your PHP Memory Limit

If this doesn’t resolve your WordPress HTTP error, you can try increasing your PHP memory limit.

Usually, your host will set the limit for PHP memory.

It is often low for a shared hosting plan. (Maybe it’s time to get an exclusive hosting plan.)

WordPress will try to increase this limit by itself.

However, it can’t exceed the limit set by your host. So, you’ll need to do it manually.

  1. Open your root directory.
  2. Find the wp-config.php file and download it by right-clicking.
  3. Add the following code under the opening PHP tag using a text editor of your choice.

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

  4. Now, save and re-upload the file to your root directory.

Let it replace the original file.

Refresh your FTP client and your website to see if the response code 500 continues to show.

If it does, PHP memory limit is not the cause.

So, you should remove the above code from the wp-config.php file, save it, and re-upload it to your root directory.

Sometimes, however, you may need to increase the memory limit to more than 250MB. So, this will be a trial and error approach depending on your website’s required memory limit.

3. Identify And Replace Faulty Plugins

Next, you can try identifying and replacing faulty plugins to resolve the issue.

  1. Go to the WordPress admin section, and start deactivating your plugins one by one.
  2. After each deactivation, refresh your site to check if the error code 500 disappears.
  3. You can also use FTP client to identify a faulty plugin.
  4. Go to the root directory and open the wp-content folder.
  5. Now add each plugin one by one to the blank directory, and refresh your site each time to see if the error is fixed.

If it does, remove the plugin in question. If the plugin is essential for your website, find an alternative that works.

If you can’t find a replacement, contact the site developer.

4. Debug Your Site

You can use WordPress’ built-in debugging feature if you are finding it difficult to determine the cause of error code 500.

However, only a seasoned WordPress developer should do this.

You will need to add a small code in your wp-config.php file.

After opening this file, locate WP_DEBUG, and set it to “True.”

If you can’t find it, you will need to create the following code yourself.

define( “WP_DEBUG”, true );
define( ‘WP_DEBUG_DISPLAY’, true );

After saving this code, reload your site to see if debugging can display the actual error instead of the response code 500.

5. Check File Permissions

While you are at it, you should also check file permissions. It’s worth a try.

Usually, you should have the permissions set to 755 or 644 for the folders and files in your WordPress directory.

Using the FTP client, open your root directory.

Most FTP clients have a Permissions tab that you can use to check the permissions for each file and folder.

Make sure each one is set to either 755 or 644.

6. Upload A Clean Copy of Core WordPress Files

However, some web hosting providers do not allow to replace the WordPress core files. Make sure to ask the hosting company if they can do it. If they can’t, take the following steps.

Just make sure to use an FTP client instead of a File Manager for this method.

  1. Download the latest version of WordPress and extract the ZIP file.
  2. Open the extracted ZIP file using your FTP client.
  3. Delete the Entire wp-content folder and the wp-config-sample.php file.
  4. Now, upload all the remaining files to your site using your FTP client.
  5. When prompted, select the Overwrite option to replace the old core files with fresh ones.
  6. Refresh both your client and the website.

This should do the trick. If it doesn’t, it is recommended to go ahead with a complete WordPress re-install.

7. Talk To Your Host

If all of the above tricks fail, your last option is to contact your web hosting provider.

Most hosts, however, tend to point fingers at your root directory, not their servers.

So, make sure to go through each one of these steps before calling your host.

When you contact them, provide a rundown of what you have done so far.

Chances are you may find the potential cause behind 500 internal server error in your host’s server logs.

Parting Words

WordPress sites can run into error codes 500 fairly often. Although they can be a real pain to address because the error message is so unspecific, there are plenty of methods you can use to troubleshoot the issue.

Try some of the solutions listed above, and if none of them work, reach out to your web server host to see what’s going on and what other things you can try.

If you have any further questions about 500 internal server errors (or any other type of site error), please don’t hesitate to reach out! Our team is always happy to help!

  • Vijay has 7 years of cross-platform experience in systems administration. Vijay is responsible for the entire IT infrastructure, networking, and managing diferent types of web hosting and database servers including Cloud Computing. Vijay boasts superior troubleshooting and technical support abilities with migrations, network connectivity, and security and database applications. Vijay has a Master’s degree in Computer Application. He is also a Microsoft Certified IT Professional.
11 Shares
Buffer1
Share4
Tweet6
Share
Pin