Most WordPress breakdowns come down to five errors: a white screen or "critical error", "Error establishing a database connection", a 500 Internal Server Error, "Allowed memory size exhausted" and a login page that keeps reloading. Each has a short list of causes and a fix you can apply yourself from your control panel. This page gives the quick fix for each and links to the full guide.
The complete method, with the error logs to read and fixes for Joomla and Drupal too, is in troubleshooting WordPress and other CMS. This page is the short WordPress checklist.
Read the error first: turn on WP_DEBUG_LOG and check wp-content/debug.log. A white screen is usually a plugin or theme, so rename the plugins folder to test. A database error means the details in wp-config.php don't match your panel. A 500 is often .htaccess, including any php_value line. On our cPanel servers, add ?t=1 to the URL when you test, because a cached copy can hide your fix.
Copy any file before you edit it and export the database from phpMyAdmin. On cPanel and DirectAdmin, JetBackup 5 keeps weekly backups (Sunday, 5 copies) that you can restore from your panel; see backup and restore with JetBackup.
1. White screen or "There has been a critical error"
Cause: a PHP fatal error, usually from a plugin or theme update.
- Use the recovery-mode link WordPress emails to the site admin, if it arrived: it logs you in with the faulty plugin paused.
- Otherwise, add these lines to
wp-config.phpabove the "stop editing" line, reload the page and readwp-content/debug.log:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );- No log? In File Manager or FTP, rename
wp-content/pluginstoplugins-off. If the site returns, rename it back and turn plugins off one at a time to find the culprit. Do the same with the active theme's folder. - Set
WP_DEBUGback tofalsewhen you are done.
Full walk-through: fixing the WordPress blank page.
2. "Error establishing a database connection"
Compare DB_NAME, DB_USER, DB_PASSWORD and DB_HOST in wp-config.php with your panel's Manage My Databases page. On shared hosting, DB_HOST is normally localhost, and the database and user names start with your account username. Check the user is added to the database with all privileges. If everything matches and it still fails, open a ticket. See troubleshooting the database connection error.
3. 500 Internal Server Error
- Rename
.htaccessto.htaccess_oldand reload. If the site works, go to Settings › Permalinks and click Save Changes to write a clean one. - Remove any
php_valueorphp_flagline.Our servers don't run PHP as an Apache module, so those lines cause a 500; set PHP options in your panel instead. - Check the PHP version in your panelan old plugin can fail on a new version.
See troubleshooting HTTP 500 in WordPress.
4. "Allowed memory size exhausted"
Raise WordPress's own limit in wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );This can't go above the PHP memory_limit set for your account; change that in your panel. If a plugin keeps running out, the plugin is the problem. See resolving PHP memory errors.
5. Login page keeps reloading
- Clear cookies for your site, or try a private window.
- Checkthat WordPress Address and Site Address match exactly, including
https://andwww. If you can't log in to change them, correctsiteurlandhomein thewp_optionstable in phpMyAdmin. - Rename the
pluginsfolderto rule out a security or caching plugin.
6. Other errors you may see
| Error | Usual cause |
|---|---|
| 508 Resource Limit Is Reached | Too many slow PHP requests at once |
| 504 Gateway Timeout | A request ran longer than 90 seconds on cPanel (most sites stop a request earlier, after about 60 seconds) |
| 403 Forbidden | Permissions, or a firewall rule blocking one request |
Guides: resource limit errors on WordPress, gateway errors in WordPress and HTTP error 403.
If the site was hacked rather than broken, follow the hacked website checklist instead.
- 25 GB NVMe SSD Storage
- 50 GB Monthly Bandwidth
- 1 Website
- 10 Email Accounts
Prices on the cards exclude 18% GST.
How do I fix the WordPress white screen of death?
Turn on WP_DEBUG_LOG in wp-config.php and read wp-content/debug.log to find the plugin or theme at fault. If there is no log, rename wp-content/plugins to disable all plugins, then re-enable them one at a time.
What causes "Error establishing a database connection"?
The database name, user, password or host in wp-config.php doesn't match the database in your control panel, or the user isn't assigned to the database. On shared hosting the host is normally localhost.
Why does my WordPress site show a 500 error after editing .htaccess?
The file has a syntax error or a php_value or php_flag line. Domain India servers don't run PHP as an Apache module, so those lines cause a 500. Rename .htaccess, then re-save the permalinks.
How do I increase the WordPress memory limit?
Add define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php. It can't exceed the PHP memory_limit for your account, which you change in your control panel.
I fixed the error but still see it. Why?
On Domain India cPanel servers, a cache in front of the site can keep a copy of a page for up to two hours. Add ?t=1 to the URL to see the current version.
Ready to get your site back? Work through the full guide to troubleshooting WordPress and other CMS, or open a support ticket with the URL, the exact error and the time it happened.
Send us the URL, the exact error and what changed, and we will check the server logs for the same moment.
Open a support ticket