Fixing common WordPress errors Print

  • 0

Most WordPress problems come from a plugin, a theme or the PHP version. Work through these steps in order. Most sites are back up by step 3.

Before you start: you can always roll back. We keep automatic backups you can restore yourself (see How to restore a backup).

Which error do you have?

What you seeMost likely cause
A blank white page, or "There has been a critical error on this website"A plugin or theme that is broken or not compatible
500 Internal Server ErrorA plugin, or a bad line in the .htaccess file
"Error establishing a database connection"Wrong database details in wp-config.php, or the database user was removed
"Briefly unavailable for scheduled maintenance"An update was interrupted
Uploads fail, or "Allowed memory size exhausted"PHP limits too low

Step 1: check the error log

  1. Log in to cPanel (see How to log in to cPanel).
  2. In the Metrics section, click Errors.
  3. Look at the newest lines at the top. They often name the plugin or theme causing the problem, for example /wp-content/plugins/plugin-name/.

Errors page in cPanel

Step 2: turn off your plugins

If you can still get into WordPress, go to Plugins, deactivate them all, then turn them back on one at a time until the error comes back. If you can't get in:

  1. In cPanel, open File Manager (see How to upload files with File Manager).
  2. Go to public_html/wp-content.
  3. Right-click the plugins folder and rename it to plugins-off. This switches every plugin off.
  4. Reload your site. If it works, rename the folder back to plugins, then rename single plugin folders inside it to find the one causing the problem.

File Manager toolbar

If plugins aren't the cause, do the same with your theme: rename its folder in wp-content/themes and WordPress will fall back to a default theme.

Step 3: check your PHP version and limits

Old plugins can break on a new PHP version, and new ones may need a recent one. Try the version just before or after yours in Select PHP Version, and raise memory_limit if the log mentions memory. See How to change your PHP version and limits.

Step 4: fix the other common errors

  • 500 error after a change: in File Manager, turn on Settings → Show Hidden Files, rename .htaccess in public_html to .htaccess-old, then in WordPress go to Settings → Permalinks and click Save to create a fresh one.
  • Stuck in maintenance mode: delete the file called .maintenance in public_html.
  • Database connection error: check that the database name, user and password in wp-config.php match the ones in cPanel under Manage My Databases (see How to create a MySQL database).
  • Locked out of the admin: see How to reset your WordPress admin password.

Step 5: restore a backup

If nothing works, restore your site to the last day it was working. See How to restore a backup.

Still broken? Open a support ticket with your website address and the error message, and we'll take a look.


Was this answer helpful?

« Back

Powered by WHMCompleteSolution