Foreword
Came across 500 Internal Server Error in WordPress? This happens to almost everyone. 500 Internal Server Error is one of the most common errors encountered by WordPress users. Yet, it isn’t easy to find the real cause of the 500 Internal Server Error in WordPress. Where such as 404 errors caused specifically either by broken permalinks and modified pages’ URLs.
Why does 500 Internal Server Error in WordPress occur?
The main reasons 500 Internal Server Error are broken .htaccess files, incorrectly installed permissions, script delays, inconsistent PHP version, CMS and plugins update. Those are not all the error reasons. You need to learn more and understand the real cause. The best tips to find out the 500 Internal Server Error in WordPress cause is to track your steps before it occurred.
Recall, which of your action could have been the cause of your WordPress site stoppage. Perhaps it was the work with the plugins. Have you installed or updated plugins recently? Use only reliable WordPress plugins. We have prepared for you a list of reliable plugins which are necessary for your WordPress site. Before installing the plugins, please read our guide on how to test plugin reliability. So, probably you remembered what could have been the reason for your site’s stoppage. Once you understand this, it will be much easier to solve the problem.
Here is a simple guide to fixing 500 Internal Server Error in WordPress. Those 9 different ways will help you cope with all possible causes. Let’s not waste time and start.
What’s Required
Before you start processing with this tutorial, you need the following:
- Hosting control panel access
- WordPress control panel access
1st Way — 500 Internal Server Error in WordPress Because of the Plugins or Themes
The majority of the times 500 Internal Server Error in WordPress occurs because of installing or updating plugins or themes. If you already know which plugin could has caused this problem, you are already half way to resolving it.
Try to use only the time proved plugins. Do not install multiple plugins to resolve the same issue. Since not all plugins are compatible with each other and not all themes are compatible with any plugin, you need to carefully select the tools. How to choose a WordPress theme and what’s better paid or free WP themes we have already written.
500 Internal Server Error in WordPress Because of Plugins Update or Installation
The page ceased to work after the plugin installation or update. You can fix it. Just disable or delete a plugin. Depending on circumstances, there are two methods to achieve the goal.
Deactivate Plugins Through the WordPress Control Panel
Login to your WordPress control panel, follow these steps:
- Press on Plugins → Installed Plugins at the side panel.
2. Deactivate the problem plugin.
- Refresh the site in your browser to check if the problem is resolved.
- If not, deactivate another plugin and repeat this process until all the plugins are deactivated (or the site will work).
- After you find the plugin guilty of the error, try reinstalling it over. You can as well look for further plugins to replace it. Get in touch with the plugin’s developers to update information about its work on your WordPress.
Deactivate WordPress Plugins via FTP
There are circumstances where the error doesn’t let access to the WordPress control panel. Then you have to deactivate and delete the plugin through the File Manager in the cPanel of your hosting or FTP such as FileZilla Client.
- Go to your WordPress root directory and proceed to the wp-content/plugins folder.
- Find the problem plugin and rename it to deactivate. For instance, you can add .deactivated to the end of the file so you wouldn’t forget. If you want to remove it completely, just delete the folder with the plugin.
- Update your site. If the problem stays, perform this action for the remaining plugins before they are completely disabled (or until your site is working).
- When you find the broken plugin, you can try to reinstall it, find a replacement or contact the plugin developers for assistance.
500 Internal Server Error in WordPress Because of the Theme Installation or Update
You found or purchased a new WordPress theme you like but after installing it, you log in to the site and get a 500 Internal Server Error. When you get into the console, there is a 500 error as well. Often the WordPress theme installation causes the Internet Server Error. In this case, you can simply solve the issue – replace the theme. We already wrote about how to avoid common mistakes when choosing a WordPress theme.
We recommend choosing the free themes in the official directory. Premium themes with professional web design, clean code and high-quality technical support you can purchase at various marketplaces. According to StylemixThemes experts opinion ThemeForest is one of the best.
If your site stops operating once you install or update the theme, you can resolve the problem by changing it.
Change WordPress Theme Using the WordPress Control Panel
Login to your WordPress control panel, follow these steps:
- Go to Appearance → Themes.
- Select other WordPress theme and press Activate.
- As soon as you activate the theme, you will see a message with a link to your site.
Change WP Theme with phpMyAdmin
If you deleted or edited the standard theme and it doesn’t work, then you can download it again. Links for downloading the themes are above.
Next, go to phpMyAdmin and select your site Database. Proceed to the SQL tab and copy&paste the code:
UPDATE wp_options SET option_value = 'nametheme' WHERE option_name = 'template'; UPDATE wp_options SET option_value = 'nametheme' WHERE option_name = 'stylesheet'; UPDATE wp_options SET option_value = 'nametheme' WHERE option_name = 'current_theme';
It is important to specify the theme name correctly when changing it this way. We recommend using standard free themes in this case.
After that, your site content will be displayed again.
Now you can reload your site in the browser and it will load with a new theme. If 500 error was associated with your old theme, this should solve the problem. You can try to reinstall your old theme or contact the developer for info on properly installing your WordPress theme.
2nd Way – Checking for .htaccess File
The 500 Internal Server Error in WordPress can be caused by the .htaccess file problems. In case of its unsuccessful editing or if some plugins are working incorrectly, the .htaccess file may contain errors. Sometimes this is due to an attempt to change parameters that are forbidden to change or an attempt to configure an uninstalled web server module.
Usually, the .htaccess file is located in the root folder of your site (which you will get into immediately after connecting to FTP).
Since the name of this file starts with a dot – by default it is considered to be hidden and is not displayed by the FTP client.
In the FTP FileZilla client, go to the “Server” and tick the “Force showing hidden files” box and then update the files list or reconnect to FTP to see the file.
Now this file is available and you can open it in any text editor, for example, in Notepad, but for more convenience we recommend using Notepad ++.
When you open the file, you will see the text, which is essentially the rules and web server operation instructions. You can view the changes you’ve made and fix the errors or you can simply delete this file, and then generate a new one using WordPress. To do this, go to the site admin panel, Settings → Permanent links, select the desired option and click “Save“.
Here you need to go step by step:
- Login to your hosting cPanel and proceed to the File Manager. An alternative way is to use FileZilla.
- Go to your WordPress root directory (if you see files like wp-content and wp-includes, you’re in the right place).
- Find the .htaccess file and turn it off. You can do this by giving it another name – .htaccess1.
- After that, create a new .htaccess file and paste the standard .htaccess code into it:
# BEGIN WordPress <IfModule mod_rewrite.c>; RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>; # END WordPress
- Make sure to save the file.
Now, open your site in the browser and see if the bug is fixed. If not, continue to read the guide.
3rd Way – Increase the PHP Limits
If the two ways described above didn’t bring any result, incorrect PHP values or a lack of memory could cause the error. This is due to the fact that scripts and plugins require a certain amount of memory for their correct operation. In addition to this, when your site is loaded, the browser makes a huge number of requests to load the scripts, plugins and content. When the amount of memory to load the scripts and plugins is not enough, the 500 Internal Server Error in WordPress will most likely be issued. That’s why it’s important to increase your site’s memory and other PHP settings. You can do this using the .htaccess file. Here are a few lines that we recommend that you add:
php_value upload_max_filesize 128M php_value post_max_size 128M php_value max_execution_time 300 php_value max_input_time 300 php_value memory_limit 256M
Click on Save. Reload your site. If the problem happens because of the insufficient PHP value, then this method should help with its solution.
4th Way – Change the PHP Version
Some WordPress plugins require a specific PHP version. If the recommended requirements for them are not met, then as a result, you may receive the 500 error. You can check whether it is caused by the PHP version by changing it. This can be done through the hosting cPanel in the PHP sections.
Pretend you do not know what version of PHP you need. Try to turn each of them one by one. Press save the changes. Update the site. If none of the listed help, return your previous PHP version and go to the next routine.
5th Way – Enabling Error Displays
Finding the source of the 500 Internal Server Error in WordPress is the toughest part in the fixing procedure. If nothing of the previous has helped, start searching deeper – checking your errors. There are several methods for this:
Enabling Error Display
By enabling the display of errors, you will be able to find a specific code for your site that triggers it. This can be done in the same section where we changed the PHP version. Set the Display Errors On and click Save.
You need to reload your site. All code errors will be displayed on the screen as shown:
When you locate the error, open the file specified in it and look at the desired line. You can use Google, Stackoverflow, WordPress Forum, or contact your developer for info on cracking this problem.
6th Way – Debugging Your WordPress
WordPress has its own debugging system. You can use it to resolve problems with your code. This can also help solve the 500 error. To start using it, you need to make several changes to your wp-config.php file.
- Locate the following line in the wp-config.php file:
define('WP_DEBUG', false);
- Delete it and paste the following code into its place:
// 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 errors and warnings define( 'WP_DEBUG_DISPLAY', false ); @ini_set( 'display_errors', 0 ); // Use dev versions of core JS and CSS files (only needed if you are modifying these core files) define( 'SCRIPT_DEBUG', true );
Reload your website and open the File Manager. Go to the wp-content directory and look for the debug.log file. Open editing this file to see its values.So you identify the root of the error. You can get in touch with the developer or Google, Stackoverflow, WordPress Forum to resolve the issue. Learn more on WordPress debug at the official WordPress directory.
7th Way – Backup Copy Restore
When you make a WordPress backup before it crashes, restoring it could be a solution as well. First, delete all WordPress files. Download your back-up and check whether your site is working.
The manual way to restore WordPress may not be suitable for everyone. If you think this is too complicated, we can tell you another way. Unfortunately, this doesn’t help you if your site doesn’t work, but it will definitely help you avoid such problems in the future.
- Install and activate the https://wordpress.org/plugins/all-in-one-wp-migration/plugin.
- Find it in your WordPress control panel and click the Export button.
- Select the File option if you want to download a backup to your computer.
- Download the generated backup to your computer. It contains the files of your site and database.
- When 500 Internal Server Error in WordPress (or any other problem) occurs and you cannot resolve it, restore your site.
- To restore the site via your generated backup, delete your site entirely and install a new WordPress, together with the All-in-One plugin. Afterwards, choose the Import feature, select the generated backup and carry on the recovery process.
8th Way – Reinstall WordPress Files
When the error still appears, there is a revolutionary approach. All you need to do is:
- Download the WordPress latest version.
- Save and unzip it to your computer.
- Delete the wp-config-sample.php file and the wp-content folder to avoid overwriting important information.
- Move all the core files to your hosting account and overwrite them. This can be done using the FileZilla FTP Client.
- Further you should get a window with a consent to overwrite the files. Set the values as in the screenshot to automate the procedure.
The boot process can take 10 to 20 minutes. Once completed, try to reload your site again. If an error was associated with WordPress core files, this method should help.
9th Way – Contact Your Hosting
If you’ve gone through all these ways and didn’t fix the server error, your hosting provider will assist you. But, it is necessary to do all the actions described above. This is the only way to confirm that the issue isn’t in the root directory.
Many hosting providers offer worthy technical support and help get rid of the WordPress 500 internal server error. Still, there are corrupt hosting providers who will blame the site files without acknowledging the errors of their servers. Obviously, WordPress plugins and themes can cause a lot of problems.
That’s why it’s so vital to go over all those ways and clarify to the hosting support that you have entirely checked the site files and they are operating properly. Tell that there is nothing in your site file system which can cause the 500 Internal server error …. Ask the hosting to check their servers’ logs and find out if there are any glitches.
Final Thoughts
Anybody who practices WordPress at least once experienced an internal server error. Whether you are an advanced developer or a beginner, fixing the 500 error is a fairly simple procedure. You just have to know where to look for its cause. As in real situation, to solve the problem you must first locate its source. Afterwards, you can use online means or this tutorial to solve that problem.
The 500 Internal Server Error solution is complicated by the fact that it doesn’t always arise due to a specific reason. Therefore, the solution of the problem cannot always be found clearly. This resembles a patient’s illness where it is difficult for a doctor to diagnose. But if you find the cause, not the symptoms, then you can cope with any disease. As you understand, there are 9 steps to eliminate 500 Internal Server Error in WordPress. We hope our steps have simplified the problem areas search and you cured your site’s 500 Internal Server Error disease.
Main Tips
The main thing – make the site’s backup, update the theme and plugins on a regular basis, always use the reliable tools. If you do not know whether to install the plugin or not, contact the theme developer. You will be consulted and directed on which plugins their theme is compatible with. Otherwise, you risk jeopardizing your .htaccess file.
Carefully consider the choice of your hosting package. StylemixThemes clients often contact our technical support for resolving this problem. According to our estimates, 500 Internal Server Error most often occurs in those who use shared hosting. Be attentive to the choice of the reliable hosting for your site. StylemixThemes experts have created for you a guide on how to choose WordPress hosting. Transfer your site to a tariff for growing traffic and enjoy the smooth operation of your website!
Hi
Hi. Thank you for your comment.
How can I help you?