Get Rid of 500 Internal Server Error in WordPress – [Ultimate Guide]
- Last Updated: Oct 23rd, 2018
- Posted by: admin
- Category: How to Fix
“Nothing is perfect”. WordPress is the widely used CMS but still faces errors. But every error is a code for a user to find out the problem in their website.
Each error have their own line of notification like-
- 401 Error -Unauthorized error
- 400 Error -Bad Request error
- 403 Error -Forbidden Error
- 404 Error -Page Not Found
- 500 Error -Internal Server Error
In this article, we will discuss ‘500 internal server error’. The error usually occurs in the root directory, where your WordPress files are stored. It can also cause if there is any problem on your host’s server. Don’t get hyper! Let’s have a look over what is WordPress 500 internal server error and the ways to fix it.
What is 500 internal server error in WordPress
500 internal server error in WordPress is one of the most irritating errors that can occur in a website. It is a server-side problem.
When you type a particular URL into the address bar you are requesting the server to display a page. Due to some reason, the server is unable to display that page and that’s why it raises its hands (not really) and tells you there’s an error.
The “500” is the server response code for this type of error and “internal” means that the error is on the server side and not at your side. Let’s see what are the reasons that cause 500 internal server error in WordPress.
Reasons of Internal Server Error in WordPress
Internal server error is not limited to WordPress and it can occur with anything else running on your server as well.
- Internal server error in WordPress is usually caused by the plugin and/or theme functions.
- When you are trying to access the administrator area while the rest of the site works well.
- Other causes of internal server error in WordPress are corrupted .htaccess file and PHP memory limit.
When you are aware of the reason then it becomes easy to fix the error. Let’s see the ways to fix 500 internal server error.
Ideas to fix 500 internal server error in WordPress
These solutions require making a lot of changes in your site’s root directory. So, we strongly recommended you to backup your site before trying any of these solutions.
Check .htaccess file
The .htaccess(hypertext Access file) is the configuration file of a website. This configuring file used to run Apache Web Server software. Any alteration in this file can cause an error.
If 500 Internal Server Errors is caused due to misconfiguration of ‘.htaccess’ file then rename the file like ‘.htaccess_bk’. Generally, this folder is present in the public_html folder of your file manager.
As it is a hidden file, So it might be possible that you are not able to find it. Here you need to choose the option called show hidden files in settings of your file manager. Check the permissions for ‘.htaccess’ usually, it is 644.
Once its done find the file and rename it. Reload your site and check the 500 internal error is resolved or not. If this technique doesn’t work for you then move on to another way.
Check PHP version
If you are using PHP version above 5.3 and your .htaccess file consists of “register_globals = on” line you need to remove it and reload your site. As register globals only support till PHP version 5.3.
Check WordPress Themes
- Use an FTP client or cPanel.
- Next, open the ‘themes’ folder and rename the folder containing all files which access the theme which is activated.
- It will deactivate the current theme and the default theme will be activated automatically.
- At last, reload the website.
Increasing the PHP Memory Limit
Sometimes this Internal server error can occur if you are exhausting your PHP memory limit. If you are seeing the internal server error when you trying to login to your WordPress admin or uploading an image in your wp-admin, then try to increase the memory limit by following the steps given below
- Firstly, create a blank text file called php.ini
- Paste this code in there: memory=64MB and Save the file
- Using FTP upload it into your /wp-admin/ folder.
If increasing the memory limit solve the problem for you, then you have fixed the problem temporarily. The reason for saying this is because there has to be something that is exhausting your memory limit. This could be a bad coded plugin or even a theme function. We recommend that you ask your WordPress web hosting company to look into the server logs to help you find the exact problem.
Deactivate all Plugins
If none of the above-given solutions worked for you, then this error is being caused by a precise plugin. It can be possible that it is a combination of plugins that are not playing well with each other. So, you have to deactivate all WordPress plugins at once.
If deactivating all of the plugins fixed the error, then you know it is one of the plugins that is causing the error. Just go through and reactivate one plugin at a time unless you see the one that caused the issue. Get relieved of that plugin, and report the error to the plugin author.
Re-uploading Core Files
If the plugin option didn’t fix the internal server error, then it gives the benefit re-uploading the wp-admin and wp-includes folder from a fresh WordPress install. This will not delete any of your information. But may easily fix the problem in case any file was corrupted. See the step to proceed-
- Firstly, backup your WordPress website and download a fresh version of WordPress on the main site.
- Now, extract the files from Zip file, and open it. Access the root directory and upload the wp-admin and wp-includes file from a fresh version of WordPress.
- Reload your website and check whether the error is gone or not. If the error is gone it means the error is due to corrupted core files.
Ask your Hosting Provider
If nothing works for you then get in touch with your hosting provider. By seeing the server logs, they should be able to get to the bottom of things. Have a look at our guide on How to choose best WordPress Hosting.
Debugging Your WordPress Website
Still, you are unable to identify What causing the error. Then, use WordPress built-in debugging feature. Add a code in your wp-config.php and enable debugging feature. After adding this feature every error that present in your website is recorded in a file in the site directory files.
|// Enable wp__DEBUG mode|
define( ‘WP_DEBUG’,true ) ;
// Enable Debug logging to the /wp-content?debug.log file
define( ‘WP_DEBUG_LOG’,true ) ;
// Disable display of error and warnings
define( ‘WP_DEBUG_DISPLAY’, false ) ;
@ini_set( ‘display_errors” 0)
// use dev version of core JS and CSS files ( only nedded if you are modifying these)
define( ‘SCRIPT_DEBUG’, True) ;
If the problem still remains the same then move on to the next method to resolve the issue.
We have discussed all the available solutions that fix the internal server error problem in WordPress. So, from this article, you will get a clear opinion from where literally the problem arises and you encounter 500 Internal Server Error.
Hope we shared the all required knowledge to our viewers. If you like are attempt then like and share with your friends too. Use the comment box to share feedback for us.
If your problem is still not solved, contact our WordPress Support Team. Dial Toll-Free: +1 888 614 0555 to talk one of our executives.