Want to fix 500 internal server error WordPress? Here you’ve arrived on the right webpage. TheWebsiteDev is going to provide you with a step by step guide on how to fix 500 internal server error WordPress easily.
First of all, avoid getting panic when you see this error on your WordPress website. It’s easier to fix this. Well, this error never tells what’s wrong with your website, but can be fixed easily following the methods we have provided in this guide.
Backup Your WordPress Website First
Yes, before you try the below methods, it’s essential that you back up your WordPress website. Also, if you’re encountering this error after making any recent changes to your website, restoring the backup prior to the changes can help you get rid of this error. However, if the backup doesn’t work for you, try the below approaches.
So, that’s all with the jargons let’s now explore some critical causes of 500 internal server error WordPress…
The Causes Of 500 Internal Server Error WordPress
There is a number of issues leading to 500 internal server error WordPress. However, below are some of the common issues.
- PHP memory limit issues
- Corrupted .htaccess file
- Problematic plugins
- Corrupted core files of WordPress
Now let’s explore all the issues more appropriately in the below section and methods to fix 500 internal server error WordPress.
How To Fix 500 Internal Server Error WordPress
#1 Fix PHP Memory Limit Issue To Fix 500 Internal Server Error WordPress
Do you know that you can increase the PHP memory limit by merely editing the wp.config.php? Yes, you can and here is how to do so.
Start by logging in to your WordPress website directory and downloading the wp-config.php file on your pc or laptop.
Step 2: Now open the downloaded file with any code editor like NotePad++ or Atom and insert “define (‘WP_MEMORY_LIMIT’, ‘300M’);”. Make sure you insert it right above the line saying /* That’s all, stop editing! Also, remember not to change anything else in the code.
This code actually give the command to the WordPress for increasing the PHP memory limit up to 300mb.
Now just save the changes you’ve made and upload the modified wp-config.php to your website directory. Also, overwrite the existing file with the modified one without worrying about anything.
Encountering 500 Internal Server Error WordPress When Accessing The Admin Area?
If this is your case, follow the below steps to fix 500 internal server error WordPress for the admin area. Users encounter this error, especially when logging in or uploading an image to the WordPress website. So, we are going to fix this by increasing the memory limit. Here is how to do so.
Open any text editor, create a new file and add the below code to it.
Now save this file and name it php.ini. Also, make sure that you get .ini extension right by selecting “All Types” in file type section.
Once you’re done with the above steps, upload this file using FTP to the subfolder of the WP admin within the WP directory.
So, that’s how you can fix 500 internal server error WordPress. However, this approach is a temporary fix. For the ultimate solution, you will have to dig into the error logs.
But even if this approach fails to fix 500 internal server error WordPress, it’s time to check whether this error is due to plugin issues. So, let’s get started with the second approach to fix 500 internal server error WordPress.
#2 Fixing Problematic Plugins To Fix 500 Internal Server Error WordPress
Faulty or two conflicting plugins are another common reason why users face to 500 internal server error WordPress on their website. So, in this approach, we will first check whether the plugin is really the main culprit or not. If yes then we will describe them first to fix 500 internal server error WordPress.
Go to the WordPress directory, login, and open WP-content folder. There you need to find the plugin folder.
Now rename this folder to anything like Plugins_old to deactivate all the installed plugins together. Also, don’t worry, your site won’t break, and you won’t lose any plugin data.
Now reload your website and see if it has fixed 500 internal server error WordPress. If yes, then now you need to remove the problematic plugin from your WordPress website.
Rename the plugin folder back to Plugins and log in again to your WP admin dashboard. Once you’re there, start activating the plugins one by one and keep refreshing your website until the error reappears. If you reactivate a plugin and find that the error is reappearing, that plugin is the main culprit behind this error. So, just delete that plugin via FTP and inform the plugin developer about the issue.
#3 Fix Corrupted .htaccess File To Fix 500 Internal Server Error WordPress
More often than not, corrupted .htaccess file results in 500 internal server error WordPress.
.htaccess or Hypertext Access is nothing but a configuration file that the web server uses for controlling the directory (WordPress directory) it lives on. Also, all subdirectories also live in the same directory.
So, to determine whether this error is due to corrupted .htaccess file or not, you will have to rename the existing .htaccess file of your website. So, let’s start with this approach and rename the existing .htaccess file to determine whether this file is the culprit or not.
How To Rename The .htaccess File?
Login and visit the directory where your website lives, that’s WordPress directory, using FTP. Also, you can ensure that you’re in the right folder if you can see subfolders like wp-includes, wp-content, wp-admin, etc.
Also, please note that in most hosting cases, the WordPress directory is the usually public_html or home directory. So, if you’ve installed WordPress on any subdomain, like mysite.com/anyurl, the anyurl” is the WordPress directory for your website.
Once you get into the WordPress directory, your next aim is to look for .htaccess File. Once you find it, click right on it and select Rename. So, now you need to rename that file to something like .htacess_oldfile or anything you can remember.
Read that after you rename the file, refresh your website and see if 500 internal server error WordPress is still there. If it has fixed the error, the .htaccess file not corrupt. However, if the error is still there, then you need to recreate the .htaccess file to 500 internal server error WordPress.
So, let’s start with the second part of this approach and know how to recreate the .htaccess file.
Recreating .htaccess File To Fix 500 Internal Server Error WordPress
Start by logging in to your WordPress admin panel and then go to settings and then into the permalink. Now here you need to click on the “Save” button available at the bottom of the screen.
Saving the permalink will auto create new .htaccess File for your website. So, that’s it. However, if this approach fails to fix 500 internal server error WordPress, try the below last and most effective approach get rid of this error.
#4 Fix Corrupted WordPress Cord Files To Fix 500 internal server error WordPress
If none of the above solutions have worked for you, then it means the error is because of the corrupted WordPress core files. So, in this approach, we will be repairing those files in order to fix 500 internal server error WordPress for your website.
However, WordPress core file corruption is the rare case, but things break all the time. So, to update and repair the core WordPress files, you will have to upload the latest versions of wp-includes and wp-admin.
Here is the step by step guide to do so;
First of all, you need to visit the WordPress.org website and download the newest version of the WordPress available for your site.
Now you need to extract the files from WordPress.zip archive. Also, locate the wp-includes and wp-admin folders inside your WordPress folder.
Now login to the WordPress directory using FTP and upload the new wp-includes and wp-admin files. In other words, you need to overwrite the older or existing versions in your WordPress directory.
Once you’re done with the above three steps, refresh your WordPress website and see if it has fixed 500 internal server error WordPress. However, if this approach fails again to fix 500 internal server error WordPress, you need to enable the WP debugging feature. It’s the built-in wordpress feature that will help you find what actually leading to fix 500 internal server error WordPress.
Don’t know how to use this feature? Read the below section.
The WordPress Debugging
You can always enable this feature or mode, and it will help you write all the error codes right into a file called “debug.log.” This file located inside the Wp-content folder. So, here is how to enable this tool, feature or mode.
First of all, login to the WordPress directory using FTP, and download the Wp-config.php file.
Now open the downloaded file and add the below-written code right before the line stating “/* that’s it stop editing! Happy blogging*/.
Now save the changes you have made and upload the modified new wp-config to your WP directory. Also, don’t hesitate to overwrite old or existing files.
So, that’s it. Now just reload your website for triggering the error. Next, open your WP directory and go to the wp-content folder and open debug.log. Now, if you’re a developer or you’ve any developer friend, he can help you in deciphering the errors.
However, we can also help you in case you stuck. So, don’t hesitate to drop your comment below and ask your questions.
In The End…
The 500 internal server error WordPress is encountered mainly due to wrong .htaccess file or exhausted PHP memory limit. However, fixing this error is pretty easier, and therefore you should get panic at all when encountering this error.
So, that’s all for now. We hope this troubleshooting guide to fix 500 internal server error WordPress has helped you. Also, let us know which of the above solutions has worked for you in the comment section. Also, read Fix “Error Establishing A Database Connection” In Your WordPress Website and How To Update WordPress Plugin Manually Via FTP. Thanks for reading this post here at TheWebsiteDev.com.