How To Fix 500 Internal Server Error in WordPress Theme
The most common and frustuating error – 500 internal server error in WordPress turning you down? Fret not, this is one of the most common WordPress errors. Since this error doesn’t give any other information, many developers find it quite difficult. In this article, we thought of helping you with some easy steps you can check and fix internal server error in WordPress. Let us first understand a bit about the error before troubleshooting it.
What is the 500 internal server error?
The web definitions of the 500 internal server error is vague. Technically, there’s no real indication as to what acutually goes wrong and cause the error. 500 Internal server error in WordPress is often caused by plugin or theme functions. Other possible causes of internal server error in WordPress could be: corrupted .htaccess file and PHP memory limit. Internal server error even show up when you are trying to access the admin area. Hence, it means that a script that’s part of a theme or a plugin did something it shouldn’t have done, and now your server has crashed.
Let’s make this work for you by troubleshooting it right away…
How to resolve 500 internal server error?
Here’s are a few alternatives you can follow to resolve this notorious 500 internal server error:
1. Turn on debugging
Whenever your WordPress site throws you a white screen or a server error, we recommend you to turn your debugging on. You can turn debugging on by editing your site’s wp-config.php file. Once you’ve accessed this file, search for WP_DEBUG within. Set it to “true”. If you don’t see it in there, you’ll need to create it yourself. You should have a line that looks like this:
define( "WP_DEBUG", true );
Safe it and reload your site to see if anything has changed. The server error may disappear and might be replaced with a different error that tells you where the issue is exactly.
Even if turning on debugging doesn’t give you the result, it is a good idea to leave it turned on until the issue is resolved.
2. Deactivate all plugins and switch themes
Try to deactivate all your plugins and see what’s what. If your website loads without the server error the issue possibly was with one of your plugins. You can switch them on one-by-one to figure out which one caused this error. Alternatively, you can also switch your theme to a default. If the site loads without 500 internal server error, the issue was within the theme. You can reach us by opening a support ticket so that our support team agents can assist you further. Majorily, these errors are actually caused by plugins.
3. Check your .htaccess file
The .htaccess file contains a number of rules that tell the server what to do in certain cases. It is commonly used for rewriting URLs or preventing access to your site for malicious intent. Use your FTP editor and check if you have an .htaccess file in your WordPress root folder. You may need to make sure your FTP editor lists hidden files before you do this. Make a backup and then delete the whole file. This may remove some important rules, but if the internal server error was caused by a mistake within the file, this will tell you.
So if the error is now resolved, the issue was with the .htaccess file. Try restoring the file and then deleting blocks of it. And if at some point, the site starts functioning, you know which block the issue is in. You can then narrow it down to a single line and then remove that line or ask us for further assistance.
4. Increase your memory
Increasing your memory limit should help in resolving this error. To do this, open your wp-config.php file in the WordPress root directory and search for WP_MEMORY_LIMIT. Change the value to something like “64M”. If it doesn’t, paste the following line into the file:
If your host has monitoring available, take a look at your resource usage with various plugins on and off to get a better idea of what is wasting those precious megabytes in your WordPress site.
5. Ask your host
There might be a few uncommon issues which can lead to 500 internal server errors in WordPress, but at this point it may be best to ask your host. Probably, the issue could be a genuine server issue, which your host can at least confirm and he can also look at things like file permissions and other sources.
6. Reinstall your WordPress theme
While we do not suggest this as a better option and since this doesn’t help in most cases, but there are some edge cases where a reinstall of WordPress theme could fix the issue. But if you wish to do this, we recommend following the manual WordPress theme instructions in the WordPress Codex.
500 Internal server errors in WordPress are usually not caused by actual server faults. Mostly, they can be corrected relatively easily using the above alternatives. And if you still cannot figure his out, you can ask your host since they have far more sophisticated tools to locate and fix issues. We hope this article helps you fix the 500 internal server error in your WordPress site. Feel free to reach us here if you need any more information or assistance with our modern WordPress themes collection.
Believer and follower of 'running the show', Jasmin Majmudar is a freelance marketing content writer, blogger, and branding consultant based in London. With a master's degree in business management, content is her forte. Extensively working with startups, artists, brands, and companies from more than 7 years, Jasmin's work has successfully made to great brand stories. A millennial soul with an introverted mind and extroverted heart, Jasmin is always with her bag, blazer, and a book (half-read).
She has nourished her passion of writing and creating successful client experiences and will continue to do so. Drop her a line here whether it's about a feedback or your craziest business idea, we will pull things together. Cheers!