WordPress not working: diagnosis and recovery
"WordPress not working" covers several situations: a completely white page, a site broken right after an update, an admin you can no longer access, or the message "Error establishing a database connection". The common point is that the site no longer renders a proper page even though nothing was deliberately changed, or only an update was applied.
In almost every case the failure can be repaired without data loss: the content is in the database, the files can be reinstalled and the cause can be read in the logs. The real risk is making things worse by trying random fixes or restoring the wrong backup.
This page helps you tell the scenarios apart (white screen, failure after update, admin locked out, database), run the basic checks and decide when to bring in a professional for a fast recovery.
Typical symptoms
- Completely white page with no message, on the public site, the admin or both.
- The site has been broken since a WordPress, theme, plugin or PHP update.
- Message "Error establishing a database connection".
- Logging into wp-admin fails: redirect loop, login page reloading, message "Sorry, you are not allowed to access this page".
- The site permanently shows "Briefly unavailable for scheduled maintenance".
- Styles have disappeared, inner pages return a 404 or the site loads a mix of contents.
Possible causes
Silent PHP fatal error
The white screen is a PHP error whose display is disabled. A plugin or theme incompatible with the WordPress or PHP version is almost always the cause.
Interrupted or partial update
An update that stops halfway leaves the .maintenance file at the root, missing files or a mix of versions that prevents loading.
Database unreachable or wrong credentials
MySQL service stopped, password changed on the hosting side, database host changed after a migration, quota exceeded or corrupted table: WordPress can no longer read its content.
Memory or resources exhausted
memory_limit reached, full disk, too many PHP processes: the server kills execution before the page is complete.
Wrong site URL
After a migration or domain change, the siteurl and home values in the database point to the old address and cause redirect loops or missing assets.
Cookies, sessions or a security plugin blocking the admin
A security plugin that moved the login URL, restricted IPs, or a misconfigured constant (FORCE_SSL_ADMIN, COOKIE_DOMAIN) prevents access to the admin.
Hack
Core files modified or deleted by an attacker produce a broken site that looks like an ordinary failure.
Checks to perform
- 1
Make the error visible
In wp-config.php, enable define('WP_DEBUG', true); and define('WP_DEBUG_LOG', true); then reload the page and read wp-content/debug.log. Also check the error_log file and your host's Apache, Nginx or PHP-FPM logs.
- 2
Look for the .maintenance file
If it is present at the site root after an interrupted update, delete it over FTP: the maintenance message disappears immediately.
- 3
Test the database
Compare the credentials in wp-config.php (DB_NAME, DB_USER, DB_PASSWORD, DB_HOST) with those in the hosting panel, then try connecting with phpMyAdmin or over SSH: mysql -u user -p -h host database_name. A server that works but returns nothing points to a permissions or table problem.
- 4
Repair the tables
Add define('WP_ALLOW_REPAIR', true); in wp-config.php, open /wp-admin/maint/repair.php, run the repair, then remove the constant.
- 5
Disable plugins and theme without the admin
Rename wp-content/plugins to plugins.old over FTP; if the site comes back, a plugin is at fault. For the theme, rename its folder: WordPress falls back to a default theme if one is installed.
- 6
Check the URLs in the database
In phpMyAdmin, wp_options table, verify that siteurl and home match the site's current address, with or without www and in https according to your setup.
- 7
Check server resources
Over SSH: df -h for disk space, free -m for memory, and systemctl status mysql or mariadb to verify the database is running.
Solutions
Remove the blocking component
Disable the plugin or theme identified in the logs, then reinstall it in a compatible version or replace it.
Finish or redo the update
Reinstall WordPress manually by overwriting wp-admin and wp-includes with the same version's files downloaded from wordpress.org, without touching wp-content or wp-config.php.
Restore the database connection
Fix the credentials, restart MySQL, free up disk space or repair damaged tables. If the database is truly lost, restore the most recent backup.
Fix URLs and redirects
Update siteurl and home, then the URLs inside the content with wp search-replace via WP-CLI or a dedicated plugin, and regenerate permalinks.
Regain admin access
Reset the password through phpMyAdmin (wp_users, MD5 hash) or WP-CLI (wp user update), temporarily disable the security plugin, clear the browser cookies.
Restore a clean backup
As a last resort, restore files and database from a backup taken before the failure, then replay the update on a staging copy to understand what broke.
When should you call a professional?
- You have no usable backup and do not want to take any risk with the site's content.
- The database reports corrupted tables or the error message names files you do not recognise.
- The site stays broken after disabling plugins and theme: the cause is on the server or database side.
- You suspect a hack or notice modified files you never touched.
- The site is critical to your business and you prefer a fast recovery to hours of trial and error.
How Agencei can help
- 1
Takeover and backup
Immediate backup of files and database in their current state, before any change.
- 2
Diagnosis
Review of WordPress, PHP and server logs, database test, precise identification of the cause: plugin, theme, update, server, database or compromise.
- 3
Recovery
Targeted fix of the faulty component, clean reinstall if needed, database repair or restore, access restored.
- 4
Verification
Check of the public site and admin, forms, checkout, emails, HTTPS and file integrity.
- 5
Consolidation
Remaining updates applied in a tested way, automatic backups set up and recommendations to prevent a new outage.
Frequently asked questions
Will I lose my content?
Rarely. Posts, pages and settings live in the database, which is usually intact even when the site displays nothing. A backup taken before any intervention protects against mistakes.
Why did a simple update break the site?
Because a plugin or theme was not compatible with the new WordPress or PHP version, or because the update was interrupted. That is why updates are tested on a copy before production.
What does "Error establishing a database connection" mean?
WordPress cannot connect to MySQL: wrong credentials in wp-config.php, MySQL service stopped, overloaded database server or deleted database. Checking the credentials and the service status solves most cases.
I can no longer log into the admin, is it a hack?
Not necessarily: a security plugin, a URL change, cookies or a PHP error in wp-admin produce the same effect. If your password was changed without you, however, treat the situation as a compromise.
How long does it take to bring the site back?
Often less than an hour when a plugin or the .maintenance file is at fault. A corrupted database or a hacked site takes more time.
Related services
WordPress Troubleshooting
White screen, 500 error, hack, broken after an update: fast diagnosis and recovery.
See this serviceIT Support
Application and server support, incident handling and clear service commitments.
See this serviceWordPress Maintenance
Tested updates, verified backups, monitoring and security for a WordPress site that stays available.
See this serviceWordPress Migration
Host or domain change, move to HTTPS, migration from Wix, Squarespace or Joomla to WordPress.
See this serviceTell us about your project
Describe your need in a few lines: we come back to you with a first analysis and the next steps.