WordPress "Internal Server Error" (500) - How To Get It Working Again After A Fatal Error

WordPress "Internal Server Error" (500) - How To Get It Working Again After A Fatal Error

Price:

Lire la suite

Expert Author Richard Peck
If WordPress experiences a "fatal" error, it will show the "Internal Server Error" page - a black + white page which will explain a number of other points / information.
The page actually has nothing to do with WordPress; it's raised by the web server software (typically Apache) as a means to display 500 errors.
HTTP errors happen on the Internet *all* the time - the most common is the famous "404" (not found) page. Each of these errors occur on the browser level, meaning that what caused them is typically dependent on more than just the CMS you're using.
The point is that there are two types of HTTP error (4xx/5xx), of which the "500" error is caused by server issues. In the case of your WordPress error page, this means that you have to appreciate that what you're seeing is likely the result of some deeper issue with either the database, application or HTTP server for your system.
The fix typically requires digging around in the WordPress config files. Therefore, if you are not confident with anything explained below, it's recommended that you talk to a profession who'll be able to help sort it out.
Solution
The good news is that - generally - the 500 / Internal Server Error is caused by a file on your system (not the database).
Don't fret about your posts / data - they are stored in a database, either on your own server or someone else's. It's rare for the database to become damaged - it's mostly the files which do it.
Thus, everything you need to do is aimed at getting rid of damaged / corrupted files that could be leading to the error:
1. Backup Your WP Installation Folder
The first step is to back up the WordPress installation folder, which allows you to keep a "hard copy" of the files which may become even more corrupted.
To do this, you need to gain access to the "FTP" for your server.
I'm not going to explain the specifics here - there are too many different ways to do it.
The general process is to get into the "Control Panel" of your hosting account, use that to gain access to the FTP of your account and download the WordPress installation folder to your device.
The following explains how...
  • Log into the "Control Panel" of your hosting account (this will vary depending on the host)
  • From the control panel, you have two options - either look for "File Manager" (if using CPanel) or "FTP" (if not using CPanel)
Whilst most hosting companies will use CPanel (and thus you get access to the inbuilt "File Manager" applet), there are some who don't have the functionality.
Because of the nature of the two types of system, the backup process alters depending on which you end up using...
  • CPanel (File Manager)
  • Click on "File Manager"
  • Browse to the folder where WordPress was installed (basically the folder which contains sub-folders including "wp-include" etc)
  • Select the folder itself (don't click into it)
  • From the top toolbar, select "Compress"
  • This will create a "zip" file of the folder
  • Select the zip file and click "Download"
  • This should give you the backed-up file
The above is what most people will end up doing. If you're not using CPanel, you'll want to use the following steps:
  • FTP
  • From your hosting account, identify the FTP account info (there are many ways this is done)
  • Once you have FTP access, you need a means to connect - if you're using Windows, FileZilla works best
  • Use FileZilla to connect to the server
  • Select the "WordPress" folder
  • Save it to your system
This will allow you to save the WP folder to your hard drive, allowing you to perform the following operations with impunity.
Make sure you keep the File Manager / FTP system open.
2. Rename The "Plugins" + "Themes" Folders
As mentioned, the majority of causes of the Internal Server Error / 500 Error in WordPress is due to a file being corrupted or damaged.
The prime culprits for said damaged files are in the "Plugins" and "Themes" folders - both of which are open to being changed, and both most cited as the reason for the fatal error.
The next step is to rename the "plugins" folder on the server:
  • Browse to the wp-includes folder inside the main WP folder
  • Locate the "plugins" folder
  • Rename it to "plugins_old" or similar
  • Try loading WordPress again
If the system doesn't load, then you should repeat the steps with the themes folder.
3. Rename.htaccess
The.htaccess file is used by Apache to determine different routing mechanisms for inbound traffic.
Whilst it generally works extremely well, there are often instances where it will become damaged / corrupted - leading to problems such as the one you're experiencing.
To fix this, you can simply rename the.htaccess file in your hosting service - which can be done using the following steps:
  • Click onto the "WordPress" installation folder
  • Inside, identify ".htaccess" and rename it to ".htaccess.bak"
  • Try accessing your WordPress admin area in your browser
  • If successful, click onto Settings > Permalinks
  • Click "Save Changes" (this generates a new.htaccess)
  • Check to see if WordPress is working again
If you follow these steps, it *should* give you - at least - rudimentary access to the WordPress admin section again - from which you'll be able to rebuild the various plugins etc.

0 Reviews