What is the cause about “Internal Server Error” ?

You want to access your website and it only displays a blank page with the inscription :

Internal Server Error

This error is often followed by this following sentence:

The server encountered an internal error or misconfiguration and was unable to complete your request.

Finally, the end of the error invites you to consult your server’s error logs to help you identify the cause of the error.

The cause

This is a 500 error. The code 500 indicates an internal problem with the server when it was supposed to return your web page.

Some servers, particularly IIS servers, offer a variety of variations of this error to help identify the type of problem encountered: https://support.microsoft.com/en-us/help/943891/the-http-status-code-in-iis-7-0-iis-7-5-and-iis-8-0

Here we will focus instead on the causes on the WordPress side that can trigger this error:

  • A plugin is faulty
  • An error with your theme
  • Your WordPress installation is corrupted
  • Your .htaccess file is incorrectly filled in.

The solution

If a plugin on your installation is faulty, you will need to disable it in order to identify which one is causing the problem:

  • To identify if a plugin is the cause of your worries:
    • Connect to your website via FTP
    • Go to the wp-content folder
    • Identify the plugins folder and rename it
    • If the error disappears, then it is a plugin that is causing your problem.
  • Once the operation previously performed successfully, to identify THE faulty plugin :
    • Recreate a plugins folder
    • Transfer the subfolders of the renamed folder one by one to the new plugins folder until the error reappears. You will then know which plugin is faulty and you can deactivate it or contact the plugin author to analyze the extent of the problem with him.
  • Another method: connect to your database
    • If necessary, temporarily, you can upload a phpmyadmin via (S)FTP: https://www.phpmyadmin.net/downloads/
    • Go to the wp-options table
    • Find the option_value field and identify the rows that contain active_plugins
    • Tip: to isolate the lines in question, you can use this query: SELECT *FROM wp_options WHERE option_name = ‘active_plugins’;
    • For each plugin, change the value a:1:{} to a:0:{}.

To find out if it’s a theme that you have a problem with, we’re going to reset the default theme

  • Connect to your site using (S)FTP
  • Go to the themes folder in wp-content and rename the folder that contains your current theme. WordPress will then use the default theme (or you can download it from https://wordpress.org/themes/twentynineteen/ and upload it to your server in the same place).

If your WordPress installation is corrupted, the easiest thing to do is to FTP back to your WordPress web server in its correct version, but only the wp-admin and wp-includes folders so as not to overwrite the rest of your installation.

Finally, if it is a problem with the .htaccess file (check this post), you can generate it :

  • Renaming the .htaccess file in order to first find access to your site
  • Recreate it by going, in your administration interface, to “Settings“, then “Permalinks“, and simply save the settings to force the generation of a valid .htaccess file.
Leave a Comment

Your email address will not be published.

You may also like