How to Fix Common WordPress Errors
WordPress errors can appear suddenly and leave your site inaccessible. This guide covers the most frequent problems — 500 Internal Server Error, White Screen of Death, database connection failures, and admin lockouts — and shows you how to fix each one.
Can't get your site back online?
Our WordPress support team can diagnose and fix site errors quickly. Open a support ticket →
500 Internal Server Error
A 500 error means something on the server went wrong but the server can't be more specific. The most common causes in WordPress are a broken plugin, a corrupted .htaccess file, or a PHP memory limit being hit.
Fix 1 — Regenerate .htaccess
- Log in to cPanel → File Manager →
public_html. - Find
.htaccess(tick Show Hidden Files if you can't see it). - Rename it to
.htaccess_old. - Log in to your WordPress admin (
/wp-admin) and go to Settings → Permalinks. - Click Save Changes — WordPress will regenerate a fresh
.htaccess.
Fix 2 — Disable all plugins via FTP/File Manager
- In File Manager, navigate to
public_html/wp-content/. - Rename the
pluginsfolder toplugins_disabled. - Try loading your site. If it loads, a plugin was the cause.
- Rename the folder back to
plugins, then re-activate plugins one at a time to find the culprit.
Fix 3 — Increase PHP memory limit
- In File Manager, open
wp-config.php. - Add this line before
/* That's all, stop editing! */:
define( 'WP_MEMORY_LIMIT', '256M' );
Save the file and refresh. See our PHP memory limit guide for more options.
White Screen of Death (Blank Page)
A completely blank page usually means a PHP fatal error is occurring silently. Enable error display temporarily to see what's failing.
Enable WordPress debug mode
- Open
wp-config.phpin File Manager. - Find
define( 'WP_DEBUG', false );and change it to:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
- Save the file and reload the page.
- Check
public_html/wp-content/debug.logfor the error message. - Once fixed, set
WP_DEBUGback tofalse.
If the error points to a plugin or theme file, disable that plugin/theme via File Manager (rename its folder) and try again.
Error Establishing a Database Connection
This error means WordPress cannot connect to its MySQL database. Check these in order:
Step 1 — Verify database credentials
- Open
wp-config.phpand checkDB_NAME,DB_USER,DB_PASSWORD, andDB_HOST. - In cPanel, go to Databases → MySQL Databases and confirm the database name and user exist and the user is assigned to the database with All Privileges.
- Try logging in to phpMyAdmin with the same credentials to confirm they work.
Step 2 — Repair the database
If credentials are correct but the error persists, the database may be corrupted.
- Add this line to
wp-config.php(before the stop-editing comment):
define( 'WP_ALLOW_REPAIR', true );
- Visit
yourdomain.co.uk/wp-admin/maint/repair.php. - Click Repair Database.
- Remove the
WP_ALLOW_REPAIRline once done.
Locked Out of WordPress Admin
Reset password via phpMyAdmin
- In cPanel, open phpMyAdmin and select your WordPress database.
- Open the
wp_userstable. - Find your admin account and click Edit.
- In the
user_passcolumn, select MD5 from the function dropdown and type your new password in the value field. - Click Go to save.
WordPress Admin Is Slow or Times Out
- Deactivate plugins: Performance or caching plugins commonly cause admin timeouts. Disable them and test.
- Increase PHP max execution time: Add
php_value max_execution_time 300to your.htaccessfile. - Check disk quota: A full disk will slow or freeze WordPress. In cPanel, check Disk Usage under Files.
Related Articles
- How to Increase PHP Memory Limit
- PHP: Allowed Memory Size Exhausted Error
- How to Install a Plugin in WordPress
Still seeing errors?
Our WordPress team can log in and fix the problem directly. Get expert help →
