As you will often encounter this error without being given any further information, you might find it frustrating.  This article will show you how to resolve internal server errors in WordPress.

What is the 500 internal server error

When you find 500 internal server errors, you might wonder what they are.  This error is not unique to WordPress but can occur on all sites hosted by a server.  However, because they give you little insight into what is causing them, they can be difficult to diagnose.

When you encounter a 500 internal server error, you may worry about how to proceed.  This might worry about your site being down with no apparent solution.  However, there are some approaches you can take to diagnose the problem.

When you encounter a 500 server error, the first thing to do is check the PHP or Apache error logs on your server.  As a 500 internal server error doesn’t give you any information on what the problem is, you will have to investigate this yourself.

Sign into your WordPress control panel and go to “Websites/domains”.  Look for the toolbar section where you can find “File Manager” “Web server settings” or “PHP settings”.  You’ll find the “Log’ option there as well.

By accessing your error logs, you should be able to give your 500 error messages a context.  This will help you understand what is causing the problem so that you can fix it.

What are the reasons for Internal Server Error in WordPress?

Internal server errors occur on all websites which use a server.  The error is generic and gives no information back to the web developer.  This means it can be hard to diagnose and fix.  This means a lot of troubleshooting.  However, following these steps might make the process easier for you.

On WordPress, the internal server error is often caused by plugin or theme.  There might also be corrupted .htaccess files and exceeded PHP memory limits.

Sometimes you will receive an internal error message when you are trying to access the admin section of the account.

Let’s explore how to go about troubleshooting your site.

The following solutions might help you:

Backing up your site

In order to search for a solution, you may need to make changes in your site’s root folder.  Backing up your site will protect you should something go wrong.

PHP Script Time Out

If your PHP script creates external connections, some of these may time out and result in a 500 internal server error.  You could resolve this by removing any unnecessary external server connections.  You could also specify the new timeout rules.

Check for corrupted .htaccess files

Corrupted files are far less of a problem than faulty plugins, but .htaccess files sometimes become corrupted after a recent plugin installation.

To check for a corrupted file, rename your main .htaccess files (you could use something like .htaccess_old).  To do this, log into your site using FTP or File Manager applications in your account’s cPanel dashboard.

Once you have connected, you’ll find the .htaccess file in the same folder as the wp-admin, wp-content and wp-includes.  Once you’ve accessed the files, you can rename them.

When the files have been renamed, check to see if the problem has been solved.  If it has, then corrupted files were the reason for the internal server error.

It is also important to remember that if your files are named anything other than .htaccess, it will result in an error.  Check the name of your files to ensure that this is not the cause of your internal errors.

Once you’ve renamed the files, access settings in your WordPress admin.  Access your Permalinks page.  Click the save button without making any changes.  Doing so will enable you to create a new .htaccess file with proper rewrite rules.  This is done to make certain that your pages or posts don’t return a 404 error.

If you’ve checked your .htaccess codes and your site is still returning an Internal server error, you need to continue troubleshooting.  Here is the next step to take:

Expand your PHP memory

Sometimes you can get an internal server error in WordPress when you have expanded your PHP memory limit.

If you’re seeing the server error only when you access your admin site, you can increase your PHP memory in the following way:

Set up a blank file called php.ini

Paste the code memory = 64mb there.  If your number is already 64mb, double it.  This will hopefully give you the memory you need to keep your site going.

Save the file

Upload this file into your /wp-admin/ file using FTP

If increasing your memory limit resolves your server error problem, then this means you’ve found the source of the problem.  However, increasing your memory limit is only the start of your solution.

You’ll now need to work out the reason for the memory use.  This could be a plugin.  It could also be a theme function.  Ask your hosting company to explore the reasons for your high memory use and assist you with finding a solution.

If expanding your memory did not prevent you from receiving an internal server WordPress error, then it’s time to keep troubleshooting.

Check your Plugins

If your server error still hasn’t been resolved, it is time to check your plugins.  It is very likely the problem is caused by one of your plugins.  The only way to find out is to disable all of your plugins.  If your error no longer occurs, then you know that your plugins were the reason for the error.

Now it is time to reconnect your plugins one at a time.  Keep going until you find the plugin which is sending the error.  Once you know which one it is, disconnect it completely and contact the author, letting them know what has happened.

A memory related problem can often be the result of a poorly coded plugin which is running ineffectively.  It may also be caused by using too many plugins on your site.  If you expand the memory you’ve been granted by your hosting server, you’ll see an error message.

Re-upload your core files

If a plugin wasn’t the source of your internal server error on WordPress it’s time to re-upload the wp-admin and wp-includes folder from a fresh WordPress install.  A core file is uncommon, but it can happen.

You don’t have to be concerned that this will remove any of your information.  It won’t, but it will assist you to solve the problem if a file has been corrupted.

Backup your WordPress site to your computer by visiting the WordPress.org site and clicking on the download button.

Once the WordPress zip file has been installed on your computer, extract the file.  Inside you’ll find a WordPress folder.

Now it’s time to go to your WordPress website, using an FTP client.

Once you’ve connected, go into the root folder of your website.  Here you’ll find the wp-admin and wp-includes and wp-content folders.

In the next column, open up the WordPress folder on your computer.  Select the wp-admin and wp-includes folders, right click and upload them.

Your FTP client will now upload these files to your server.  You’ll be asked whether you want to overwrite the existing files.  Confirm this by clicking on ‘Overwrite’ and then “Always use this action.”

Your FTP client will replace your older files with new copies.  If your folder was corrupted, this will solve the problem for you.

Contact your host

If none of the above solutions has worked for you, it’s time to contact your host.  It might be something on their side that is throwing your site out.  Alternatively, there is a problem that you need more assistance with, and your host will be able to give you this assistance.

The list above shows you some of the general problems which might have resulted in a 500 internal server error, but it isn’t exhaustive.  Chances are your host will be able to identify the problem pretty quickly and will work with you to sort it out.

Ending thoughts on the 500 internal server error

A 500 internal server error on WordPress is a catch-all term which can represent a variety of different problems.  You might feel despondent when you encounter this message and not know when to start.

Resolving the problem takes a lot of troubleshooting, and may mean some downtime for your site.  However, this guide is here to assist you with how to start.

Remember to back up your WordPress site as often as possible so that you will always have access to any information, plugins, themes and files.  Update your site and your plugins as soon as they become available.

You can also check on the compatibility of the plugins you plan to install, in order to ensure you don’t encounter any problems.  Incompatible plugins sometimes corrupt your .htaccess file.

If you enjoyed reading this article about 500 internal server error, you should read these as well: