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.
In this guide
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
- Check
wp-content/debug.logand the Errors page in cPanel for the cause. - Turn off all plugins by renaming
wp-content/pluginstoplugins-off. If the site comes back, rename it back and turn plugins on one at a time to find the faulty one. - If that doesn't help, rename your theme's folder so WordPress falls back to a default theme.
500 Internal Server Error
- Rename
.htaccessto.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.zain both. - Look in
.htaccessfor 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
- How to install WordPress on GHost Cloud
- How to speed up your WordPress site
- How to secure your WordPress site
- How to back up and restore your WordPress site
- How to create and manage MySQL databases in cPanel
- How to force HTTPS on your website
Stuck? Open a ticket and a person will reply.
