HTTP 500 or Internal Server Error is one of the most common errors that blog users, especially beginners put in panic. If this happens to your site, don’t panic, relax, take a deep breath and I’m sure if you read this post, you’ll get your site running in no time.
But before we do that, let’s understand what is HTTP 500. HTTP 500 or Internal Server Error does not just happen to your site, but in the server you are at as well. It is one of the least helpful error because it won’t explain what brought you the error and what are its possible fixes.
Causes of 500 Internal Server Error in WordPress
- PHP memory limit
- Corrupted .htaccess file
- plugin error
- Corrupted WordPress core files
- Internal Server Error When Accessing the administrator area
Increase PHP Memory Limit for WordPress
500 internal server error in WordPress can occur by exhausting your PHP memory limit. You can increase your PHP memory limit by editing your wp-config.php file inside your WordPress directory.
- From your hosting control panel, Open the wp-config.php (or download wp-config.php using FTP client then open it using a code editor)
- Add the following code just above the line that says /* That’s all, stop editing! Happy blogging. */
- Save the changes(save and upload wp-config.php to your WordPress directory). Reload your site to see if this solution fixes the 500 internal server error.
.htaccess is a configuration file used by Apache-based web servers to help control how your visitors interact with your website. Rename your existing .htaccess file and see whether 500 internal server error on your site is due to a corrupted .htaccess file.
- Open your FTP program and connect to your hosting account.(or go to File Manager tool from your hosting control panel)
- locate your .htaccess file( You can find this file in your WordPress root directory).
- Right click the file and select Rename. Rename your .htaccess file to something like .htaccess_old:
- After renaming your .htaccess file, reload your site to see if this solution fixes the 500 internal server error.
- If you still see the internal server error, change .htaccess_old back to .htaccess and try other solutions.
- If you can no longer see the internal server error, recreate .htaccess File from WordPress admin dashboard( Login to WordPress admin dashboard, navigate to Settings -> Permalinks and click the Save button at the bottom of the screen) and check if the error persists.
Disable faulty plugin or two conflicting plugins
The WordPress 500 internal server error can be the result of a faulty plugin or two conflicting plugins.
- Login to your WordPress admin dashboard >> Plugins and deactivate all of them first.
- Reload your site to see if this solution fixes the internal server error. If so, it’s time to eliminate the problematic plugin.
- Next, activate your plugins one by one while refreshing your site each time until the error reappears.
- Just delete the responsible plugin via FTP and notify the developer of the error.
Repair your WordPress core files
The 500 internal server error in WordPress can cause by corrupted WordPress core files. To repair your WordPress core files, you must upload fresh versions of wp-admin and wp-includes folders.
- Go to WordPress.org and download a fresh version of WordPress. Extract files from the WordPress .ZIP archive.
- Upload(overwriting the older versions)the new wp-admin and wp-includes folders to WordPress directory via FTP.
- Refresh your site to see if this fixes the error.
Internal Server Error When Accessing Admin Area
If you see the 500 internal server error only when you try to upload an image or login to your WordPress admin area, you can fix this by increasing the memory limit using following these steps:
- Using preferred text editor, create a new file and add this code in there: memory=64MB
Save the file as php.ini.
- Ensure you get the extension (.ini) right by choosing All types in the Save as type field:
- Upload this file to the wp-admin sub-folder within your WordPress directory using FTP.