WordPress Guides Common WordPress Errors and How to Fix Them
WordPress is reliable, but when something breaks it often shows a cryptic error. Here are the ones you’re most likely to meet and the fastest way to fix each.
Error establishing a database connection
WordPress can’t reach its database.
- Check credentials: open
wp-config.phpand confirmDB_NAME,DB_USER,DB_PASSWORDandDB_HOST(usuallylocalhost) are correct — match them to your database in cPanel. - Repair the database: add
define('WP_ALLOW_REPAIR', true);towp-config.php, then visityourdomain.com/wp-admin/maint/repair.php, run the repair, and remove the line afterwards. - Server overload: if it’s intermittent, the database may be straining shared resources — see understand your resource usage.
500 Internal Server Error
A generic server error with several possible causes:
- Corrupted
.htaccess: rename.htaccessin your site root via File Manager, then in WordPress go to Settings → Permalinks → Save to regenerate a clean one. See the .htaccess file explained. - Plugin/theme conflict: deactivate plugins and switch to a default theme — the method is in fix the WordPress white screen.
- PHP memory: raise it — see increase PHP limits.
The White Screen of Death
A blank page with no message — usually a plugin/theme conflict or memory. Full walkthrough: how to fix the WordPress white screen.
“Briefly unavailable for scheduled maintenance”
An update was interrupted and left a .maintenance file behind.
- In File Manager or FTP, delete the
.maintenancefile in your site’s root folder. The site returns at once.
“This site ahead contains harmful programs” / malware warning
Your site may be infected.
- Scan and clean it — see protect your site from malware with Imunify360 — then update everything and change passwords.
Memory exhausted / timeout on import or update
- Raise
memory_limitandmax_execution_time— see increase PHP memory, upload and execution limits.
“Are you sure you want to do this?” / nonce errors
Usually a caching or session hiccup. Clear your browser cache and your site cache (LiteSpeed Cache → Purge All), then retry.
A reliable troubleshooting order
- See the real error — enable
WP_DEBUGor check the error log. - Deactivate plugins, then switch theme.
- Regenerate
.htaccessand raise PHP memory. - Restore a backup if needed — JetBackup.
Solid hosting prevents most of these
Many WordPress errors trace back to tight resources or flaky infrastructure. Our WordPress Hosting and Web Hosting run LiteSpeed on NVMe storage with generous limits, automatic backups and error logs — and our support team can help you diagnose anything stubborn.
Frequently asked questions
What does 'Error establishing a database connection' mean?
WordPress cannot reach its database. The usual causes are wrong database details in wp-config.php, a corrupted database, or the database server being overloaded. Check the credentials first, then try repairing the database.
How do I fix a 500 internal server error in WordPress?
A 500 error is a generic server error, most often from a corrupted .htaccess file, a plugin or theme conflict, or exhausted PHP memory. Regenerate .htaccess, deactivate plugins, and raise PHP memory to isolate the cause.
Why does my site say 'briefly unavailable for scheduled maintenance'?
An update was interrupted and left a .maintenance file in the site root. Delete that file via File Manager or FTP and the site returns immediately.