Most WordPress errors come from a plugin, a theme, a setting or a full disk. Start by turning on the debug log, then find your error below.

Turn on the debug log

In wp-config.php, replace define('WP_DEBUG', false); with these lines:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Errors are now written to wp-content/debug.log without showing on your site. Set WP_DEBUG back to false when you're done.

A blank white page

  1. Check wp-content/debug.log and the Errors page in cPanel for the cause.
  2. Turn off all plugins by renaming wp-content/plugins to plugins-off. If the site comes back, rename it back and turn plugins on one at a time to find the faulty one.
  3. If that doesn't help, rename your theme's folder so WordPress falls back to a default theme.

500 Internal Server Error

  • Rename .htaccess to .htaccess-old. If the site then works, go to Settings > Permalinks and select Save to create a new one.
  • Raise the memory limit by adding this line to wp-config.php:
define('WP_MEMORY_LIMIT', '256M');
  • Check the debug log for a plugin or theme error.

Error establishing a database connection

Check DB_NAME, DB_USER and DB_PASSWORD in wp-config.php against MySQL Databases in cPanel. If they're right, the database may need repairing: add define('WP_ALLOW_REPAIR', true); to wp-config.php, go to yourdomain.co.za/wp-admin/maint/repair.php, then remove the line again.

404 on every page except the home page

Go to Settings > Permalinks and select Save without changing anything. This rewrites the rules in .htaccess. If it still fails, check that .htaccess exists in public_html.

Stuck in maintenance mode

WordPress shows a maintenance message during updates. If an update is interrupted, the message stays. Delete the .maintenance file in public_html, then run the update again.

Too many redirects

  • In Settings > General, check that both addresses match, for example https://www.yourdomain.co.za in both.
  • Look in .htaccess for duplicate HTTPS or www redirects.
  • If you use Cloudflare, set SSL to Full, not Flexible.
  • Clear your browser's cookies for the site and try again.

Related guides

Stuck? Open a ticket and a person will reply.

Was this answer helpful? 0 Users Found This Useful (0 Votes)