Skip to main content
MotherHosting

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.

  1. In File Manager, open the wp-content folder of your site.

  2. Rename the folder plugins to plugins-off.

  3. Sign in to the dashboard and open Plugins. WordPress switches off the plugins it cannot find.

  4. Rename the folder back to plugins.

  5. 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.

  1. In File Manager, select wp-config.php and press View. Note the values of DB_NAME, DB_USER and DB_HOST (normally localhost).

  2. In cPanel, open MySQL Databases. Under Current Databases, check that the database exists and that the user is listed next to it.

  3. If the user is missing there, add it again under Add User To Database with ALL PRIVILEGES.

  4. If the password may be wrong, set a new one under Current Users with Change Password. Then put the same password into the DB_PASSWORD line of wp-config.php with 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.

  1. In the dashboard, open Settings → Permalinks.

  2. 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.

Still need help?

Open a ticket and our support team will help you. We will see which article you read.

Open a ticket

To order, contact us

Tell us the plan or domain you want. We set up your order and send you the invoice.