How to Fix 500 Internal Server Error in WordPress
If you are currently seeing the HTTP 500 internal server error in WordPress message when you try to access your site, we know how you feel.
The ‘WordPress internal server error’ essentially tells you your site cannot be used because “something is wrong somewhere, but the system has no clue where”.
We understand how frustrating this can be, so in this article, we will take you through the common causes of this issue, and the solutions that have helped many WordPress users get their WordPress websites working again.
If you would rather not go through the stress, you may request our WordPress help service and our developers will help you fix your issue quickly. Otherwise, you can continue reading our guide on how to fix 500 internal server error in WordPress and do it yourself.
- Before you Start – Backup
- Causes of Internet Server Error in WordPress
- Common Solutions to Fix WordPress Internal Server Error
Before You Start – Backup
It is always advisable to do a WordPress backup of your site files and database before making any major changes.
If you had regular backups running before now, then you should be good to proceed. Otherwise, we suggest you perform manual WordPress backups of your files and database now.
Causes of Internal Server Error in WordPress
This error has several possible causes. It could be a result of a fault in your theme or plugin functions, corrupt .htaccess file, PHP memory limit, corrupt WordPress files, etc.
Now that you know what may have caused the error, let’s dig into the solution.
Common Solutions to Fix WordPress Internal Server Error
To use most of the solutions in this section, you would need to access your website files using the File Transfer Protocol. This FTP video guide shows you how to access your files via FTP using FileZilla FTP Client.
Note that you would need your cPanel details which you should already have. If you don’t, contact your web host and request the details.
When you have successfully accessed your files, FileZilla should look like this:
Check .htaccess For Errors
The .htaccess file is used to configure the settings and links in your web servers. Problems with this file can very often lead to the WordPress internal server error message.
To check if this file is the source of your issue, you need to disable it and see if your site loads normally. Here’s how:
In FileZilla, locate the folder that contains your WordPress files. This folder is usually public_html. Double click to open it.
Note: if your site is located on your main domain (www.domainname.com), your files will be located in public_html. If your site is on a sub-domain (blog.domainname.com) then you would see a folder named after your subdomain which would contain your WordPress files.
In this folder, search for the .htacess file, right-click on it, select Rename and change the name so your server can no longer read it.
Now reload your site. If it works, it means the source of the error was a corrupt .htaccess file.
Next, you would want to create a new .htaccess file. To do this, log in to your WordPress admin dashboard and go to Settings > Permalinks. Do not make any changes; simply scroll down and click Save Changes and a new .htaccess file will be created.
WordPress Internal Server Error – Increase PHP Memory Limit
Sometimes the WordPress 500 HTTP internal server error occurs because WordPress exceeds the allocated PHP memory during runtime.
If this happens, it is a sign that something else (a plugin, theme, script, etc) is using too much memory.
To check if this is the problem, you would need to increase your PHP memory limit and try loading your WordPress site. Here’s how:
In FileZilla, open the folder containing your files (usually public_html), and search for the wp-config file. Right-click on it and select View/Edit.
Scroll down towards the bottom of the opened file to find the line that says “/* That’s all, stop editing! Happy blogging. */” and paste the following code above it:
Next, save your changes and close the file. FileZilla will prompt you to upload the edited file. Click Yes and wait for the upload to complete.
Now try refreshing your site to see if this fixes the issue.
If it is, great! We now know that the issue is WordPress running out of memory. However, we still need to find out why this is happening.
The reason is, the PHP memory limit is put in place to prevent scripts from taking too much memory, so if you are running into memory problems, it means one of your plugins or themes (or even core files) is causing the issue, in which case you want to find out the one.
Although the next 3 steps are solutions to the internal server error main problem, if your issue is not yet fixed, they can also help you find out the source of your memory problems if increasing your memory limit fixed the issue.
If you want to use them for that purpose, delete the memory increase line we created above to reproduce the problem, and then proceed.
If the solutions above did not fix your issue, the next thing you want to do is disable all your WordPress plugins to see if a faulty plugin is a cause.
And since you do not have access to your admin panel, you would need to manually disable your plugins. Read this brief guide to find out how to disable plugins using FTP.
Disable Current Theme
In some cases, the script causing this error may be in your currently active theme. To check if this is the case, you can manually disable the current theme.
Follow the steps in this guide to disable your active WordPress theme.
Re-upload Core WordPress Files
If after the steps above you are still getting the WordPress HTTP 500 internal server error message, it’s time to consider the possibility that one of your core WordPress files is corrupt.
To fix this, you would need to re-upload all the WordPress core files in your wp-admin and wp-includes folders. This would not affect any of your website content but could fix the internal server error problem.
Go to the WordPress.org download page and click Download WordPress.
Extract the downloaded zip file to get the new WordPress folder (note the location of this folder).
Next, access your WordPress installation files using Filezilla and open the folder containing your WordPress files (usually public_html). In this folder, you would be able to see the wp-include and wp-admin folders.
On the left side in FileZilla, go to the location of the files in your WordPress folder you just extracted and open this folder to reveal the various WP folders and files.
On the left, select the wp-admin and wp-includes folders, right-click, and select Upload.
In the pop-up screen, select “Overwrite”, tick “Always use this action” and click OK.
When the transfer completes, access your site to see if it displays correctly. If it does, then a corrupt core file was the source of your internal server error message.
Contact Hosting Provider
In some cases, this error may be due to a problem with your WordPress hosting, which you can find out by contacting your host.
Even if that is not the case, your hosting company tech support has access to server logs that can help them pinpoint the cause of your error, so you should contact them at this point.
WordPress Internal Server Error – Conclusion
After going through all the steps above, you should no longer see the HTTP 500 internal server error message on your WordPress site. However, in some cases, this can be more stubborn than usual.
If you are still seeing this error, it may be best to have one of our developers look at it for you.
If on the other hand, you found other solutions not covered in this guide that fixed your issue, please share them with us and our readers in the comments section below.
- Most Common WooCommerce Errors & How To Fix Them
- What Is a WordPress XML Sitemap and How to Set It Up
- WordPress.com vs WordPress.org Compared – Pros and Cons