Fix common WordPress errors
Safe checks you can do in cPanel for a white screen, "Error establishing a database connection", too many redirects, and posts that show 404.
Last updated 3 min read
Most WordPress errors come from a plugin, a theme, or a setting that no longer matches. The checks below are safe: each one can be undone.
Before you start
Think about what changed last: an update, a new plugin, a setting.
Before you edit a file in File Manager, download a copy of it.
A full account causes many odd errors; see Check your disk space and free some up.
White screen or "critical error"
A plugin or a theme is usually the cause. WordPress may have emailed the admin address of the site a link to its recovery mode; look in that inbox first.
In File Manager, open the
wp-contentfolder of your site.Rename the folder
pluginstoplugins-off.Sign in to the dashboard and open Plugins. WordPress switches off the plugins it cannot find.
Rename the folder back to
plugins.Activate the plugins one at a time. When the error returns, you have found the cause: delete that plugin or look for an update of it.
No change after step 2? Rename the folder back. Then rename the folder of your active theme inside wp-content/themes; WordPress falls back to one of its default themes if one is installed.
"Error establishing a database connection"
WordPress cannot reach its database.
In File Manager, select
wp-config.phpand press View. Note the values ofDB_NAME,DB_USERandDB_HOST(normallylocalhost).In cPanel, open MySQL Databases. Under Current Databases, check that the database exists and that the user is listed next to it.
If the user is missing there, add it again under Add User To Database with ALL PRIVILEGES.
If the password may be wrong, set a new one under Current Users with Change Password. Then put the same password into the
DB_PASSWORDline ofwp-config.phpwith Edit, keeping the quotation marks.
Too many redirects
The site address and a redirect disagree.
Open the site in a private window to rule out old cookies.
Under Settings → General, both addresses must begin with
https://and use the same form of your domain: both with www or both without.Look for a second redirect under Redirects in cPanel or in a plugin. See Make your site always use https.
Posts show 404 but the home page works
The link rules in the .htaccess file are missing or damaged.
In the dashboard, open Settings → Permalinks.
Press Save Changes without changing anything. WordPress writes the rules again.
To look at the file yourself, press Settings in File Manager and tick Show Hidden Files (dotfiles).
Still broken
Open a ticket in Support, department Technical, category WordPress, or Website down if nothing loads at all. Tell us what you see and what you have tried.