Every WordPress site breaks eventually. A plugin update goes wrong, a host changes a PHP setting, or a single missing semicolon takes the whole front end offline. The good news: the most common WordPress errors follow predictable patterns, and once you know where to look, most of them take minutes to fix.
This guide walks through the common WordPress issues you are most likely to meet, from the White Screen of Death and the HTTP 500 error to database connection failures and stuck maintenance mode. For each one you get the real cause, a step-by-step fix, and copy-ready code you can paste into wp-config.php, .htaccess or your terminal. Where competitors stop at “disable your plugins,” we also show how to do it without dashboard access, how to read the error log, and how to stop the error from coming back.
1. Understanding Common WordPress Issues
Why WordPress errors happen
WordPress is a stack of moving parts: a web server, PHP, a MySQL or MariaDB database, the core software, a theme and usually a dozen or more plugins, all written by different people. An error appears when one layer breaks its contract with another. A plugin calls a function that no longer exists, PHP runs out of its memory allowance, or the database refuses a login. Almost every error falls into four buckets:
- Code problems: a theme or plugin bug, a bad snippet in functions.php, or an update that is not compatible with your PHP version.
- Resource limits: PHP memory, execution time, upload size or a crowded shared server.
- Configuration problems: a damaged .htaccess, wrong database credentials, broken permalinks or file permissions.
- Environment problems: hosting outages, an old PHP version, or a database server that is down.
Quick reference: symptom, cause and first fix
| Error | Most likely cause | Fastest first fix |
|---|---|---|
| White Screen of Death | Fatal PHP error, plugin or theme conflict, low memory | Enable debug log, rename the plugins folder |
| 500 Internal Server Error | Corrupt .htaccess, plugin fatal, PHP limits | Rename .htaccess, check the server error log |
| Error establishing a database connection | Wrong credentials, database server down | Verify DB_* values in wp-config.php |
| Parse / syntax error | Typo in PHP code you just edited | Fix the file and line named in the message |
| Memory exhausted | PHP memory limit too low or a leaky plugin | Raise WP_MEMORY_LIMIT |
| 404 Not Found | Stale rewrite rules, missing .htaccess rules | Save Settings > Permalinks |
| Connection timed out | Slow script, overloaded shared server | Raise execution time, disable heavy plugins |
| Stuck in maintenance mode | Interrupted update left a .maintenance file | Delete .maintenance |
| Image upload HTTP error | Permissions, memory, image library issue | Check uploads permissions, raise limits |
| Failed auto-upgrade | Stale update lock, permissions, timeout | Delete the core_updater.lock option |
Essential precautions before fixing WordPress errors
Fixing a broken site in a panic is how a small problem becomes a data-loss problem. Before you touch anything:
- Take a full backup of files and database, even if the site looks dead. Your host’s control panel usually has a one-click option.
- Copy the exact error message and, if shown, the file path and line number. Those details solve most cases.
- Get SFTP, SSH or your host’s File Manager ready. You need file access when the dashboard is unreachable.
- Change one thing at a time and test after each change, so you know which step actually worked.
- If possible, reproduce the fix on a local WordPress install or staging copy first.
- Run wp core version or check the footer of the dashboard so you know your exact WordPress, PHP and theme versions.
2. White Screen of Death (WSoD)
What is the WordPress White Screen of Death?
The White Screen of Death is a completely blank page with no error text, either on the front end, in /wp-admin, or both. It is the single most searched WordPress error because it gives you no clue. Under the hood, PHP hit a fatal error and, because display_errors is off on most production servers, nothing was printed.
Common causes of the white screen error
- A plugin or theme that throws a fatal error after an update or activation.
- PHP running out of memory (see the memory exhausted section).
- A syntax error in functions.php or a custom snippet.
- An incompatible PHP version, for example an old plugin running on PHP 8.x.
- A corrupted core file after an interrupted update.
- A damaged or oversized object cache, or a caching plugin dropping a broken advanced-cache.php file.
How to fix the White Screen of Death
Step 1: Turn on the debug log. Add this to wp-config.php above the line that says That’s all, stop editing, then reload the page and open /wp-content/debug.log:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
The log usually names the exact file and line, for example PHP Fatal error: Uncaught Error: Call to undefined function … in /wp-content/plugins/some-plugin/main.php:88. The plugin folder in that path is your culprit.
Step 2: Deactivate all plugins without the dashboard. Connect by SFTP or SSH and rename the plugins folder. WordPress will deactivate every plugin it can no longer find:
cd /path/to/wordpress/wp-content
mv plugins plugins.off
mkdir plugins
If the site comes back, rename plugins.off back to plugins, then reactivate plugins one at a time from the dashboard until the white screen returns. With WP-CLI installed you can do the same in one line:
wp plugin deactivate --all
wp plugin activate plugin-folder-name
Step 3: Switch to a default theme. If plugins were not the cause, test the theme:
wp theme list
wp theme activate twentytwentyfive
No WP-CLI? Rename your active theme folder inside wp-content/themes. WordPress falls back to a default theme if one is installed. If a default theme restores the site, the problem lives in your theme, often in functions.php. Review the last snippet you added; if you customize themes, always do it in a child theme so a mistake never touches the parent.
Step 4: Raise the PHP memory limit. If the log shows Allowed memory size exhausted, apply the fix in the memory section below.
Step 5: Reinstall core files. If nothing else works, replace WordPress core with a clean copy. This is safe because it leaves wp-content and wp-config.php alone:
wp core download --force --skip-content
wp core verify-checksums
Using Recovery Mode to restore your website
Since WordPress 5.2, a built-in recovery mode catches many fatal errors before they become a white screen. When it triggers, WordPress emails the site administrator address with the subject “Your Site is Experiencing a Technical Issue” and a special login link. Inside recovery mode you can deactivate the broken plugin or theme safely, then exit. You can read the official fatal error recovery mode announcement for the technical details.
If that email goes to an address nobody reads, redirect it with a small must-use plugin (wp-content/mu-plugins/recovery-email.php):
<?php
add_filter( 'recovery_mode_email', function ( $email_data ) {
$email_data['to'] = 'developer@example.com';
return $email_data;
} );
Tip: the free Health Check & Troubleshooting plugin has a troubleshooting mode that disables plugins and themes only for your own session, so visitors never see the broken state.
3. Internal Server Error (HTTP 500 Error)
What causes the WordPress 500 Internal Server Error?
The 500 Internal Server Error is a catch-all: the server knows something failed but cannot say what. On WordPress the usual suspects are a corrupted .htaccess file, a plugin or theme that crashes PHP, an exhausted memory limit, wrong file permissions, or an outdated PHP version. We cover the deeper server-side diagnosis in our dedicated guide to the 500 internal server error; here is the fast WordPress-specific route.
How to fix the HTTP 500 error
- Read the real error. The browser hides it, but the server error log does not. Check your host’s “Error Log” tool, or on a VPS run tail -n 50 /var/log/apache2/error.log (Apache) or tail -n 50 /var/log/nginx/error.log (Nginx).
- Regenerate .htaccess. See the next subsection.
- Disable plugins and switch theme using the same rename trick from the white screen section.
- Raise the memory limit and check your PHP version is supported by your plugins.
- Fix file permissions. Folders should be 755 and files 644:
cd /path/to/wordpress
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 600 wp-config.php
Regenerating a corrupted .htaccess file
Rename the existing file to .htaccess_old via SFTP. If the site loads, log in, go to Settings > Permalinks and click Save Changes. WordPress writes a fresh file. If you cannot log in yet, create a new .htaccess manually with the WordPress default rules:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Running Nginx? There is no .htaccess; the equivalent rule lives in your server block:
location / {
try_files $uri $uri/ /index.php?$args;
}
Checking WordPress error logs
Two logs matter: the server log (Apache/Nginx and PHP-FPM) and WordPress’s own wp-content/debug.log. A 500 that leaves nothing in debug.log usually means the server failed before WordPress even loaded, which points at .htaccess, a PHP directive the server rejects, or permissions.
Gotcha: adding php_value lines to .htaccess on a server running PHP-FPM or CGI will itself cause a 500 error. Use .user.ini or your host’s PHP settings panel instead.
4. Error Establishing a Database Connection
Why does WordPress fail to connect to the database?
WordPress stores every post, setting and user in MySQL or MariaDB. When it cannot log in to that database, it prints “Error establishing a database connection” and stops. The causes, in rough order of frequency:
- Wrong database name, user, password or host in wp-config.php, often after a migration or password change.
- The database server is down or overloaded (check your host’s status page).
- A corrupted database or damaged tables.
- The database user lost its privileges.
- Reached the hosting plan’s connection limit during a traffic spike.
How to check database credentials in wp-config.php
Open wp-config.php and compare these four values with the ones shown in your hosting control panel’s database section. The wp-config.php documentation explains every constant:
define( 'DB_NAME', 'your_database_name' );
define( 'DB_USER', 'your_database_user' );
define( 'DB_PASSWORD', 'your_database_password' );
define( 'DB_HOST', 'localhost' );
DB_HOST is not always localhost. Some hosts use 127.0.0.1, a socket path, or a remote hostname such as db123.example-host.com. If you are unsure, ask your host.
To test the credentials independently of WordPress, upload a temporary file called db-test.php:
<?php
$link = mysqli_connect( 'localhost', 'DB_USER', 'DB_PASSWORD', 'DB_NAME' );
if ( ! $link ) {
die( 'Connection failed: ' . mysqli_connect_error() );
}
echo 'Connected successfully';
mysqli_close( $link );
Delete this file immediately after testing. If it connects, your credentials are fine and the problem is a corrupted table. If it fails, the error text (Access denied or Unknown database or Connection refused) tells you which value is wrong.
Repairing a corrupted WordPress database
WordPress has a built-in repair tool. Add this line to wp-config.php:
define( 'WP_ALLOW_REPAIR', true );
Then visit https://yoursite.com/wp-admin/maint/repair.php and choose Repair Database. The page works without logging in, so remove the line as soon as you finish. From the command line you can do the same with WP-CLI or mysqlcheck:
wp db check
wp db repair
mysqlcheck -u DB_USER -p --auto-repair --check DB_NAME
Checking your database server and hosting environment
If credentials are right and tables are healthy, the server itself may be the problem. Check whether other sites on the same host are also down, whether MySQL is running (systemctl status mysql or mariadb), and whether you hit a connection or disk-space limit. A full disk is a surprisingly common reason MySQL stops. If it keeps happening on shared hosting, read our comparison of managed WordPress hosting vs shared hosting to see what a more stable setup looks like.
5. Syntax Error, Parse Error and Unexpected T_STRING
What causes WordPress syntax errors?
A PHP parse error means PHP could not read a file because the code is malformed. Nine times out of ten it appears right after someone pasted a snippet into functions.php, edited a plugin in the dashboard code editor, or copied code from a web page that converted straight quotes into curly quotes. The site often goes down instantly because PHP stops at the broken file.
Understanding the “Parse error: syntax error” message
A typical message looks like this:
Parse error: syntax error, unexpected T_STRING in /wp-content/themes/mytheme/functions.php on line 42
Read it in three parts: what went wrong (unexpected T_STRING), which file and which line. The line number is where PHP noticed the problem, so the real mistake is often on the line just above it. Note that on PHP 8 and newer, the wording changed: instead of T_STRING you will see messages such as unexpected identifier “echo” or unexpected token “}”. The cause is the same.
How to fix an unexpected T_STRING error
Here are the three most common triggers. First, an unescaped apostrophe inside a single-quoted string:
// Broken
echo 'Don't panic';
// Fixed: escape it, or use double quotes
echo 'Don\'t panic';
echo "Don't panic";
Second, a missing semicolon on the line above:
// Broken
$title = 'Hello'
echo $title;
// Fixed
$title = 'Hello';
echo $title;
Third, curly “smart” quotes pasted from a blog post or Word document, which PHP cannot read. Replace them with plain ‘ and “ characters.
Correcting PHP code and restoring website access
- Connect by SFTP and open the file named in the error.
- Go to the line number given, and check that line and the one above it.
- Remove or fix your last edit. If you are unsure, restore the file from a backup or re-upload a clean copy of the theme or plugin.
- If you have SSH access, check syntax before saving a fix: php -l wp-content/themes/mytheme/functions.php
To avoid this class of error altogether, add custom code with a snippet manager that validates it before saving. Our roundup of code snippets for WordPress shows safe places to put them, and the dashboard theme and plugin editors are best disabled on production:
define( 'DISALLOW_FILE_EDIT', true );
6. Memory Exhausted Error (PHP Memory Limit)
Why does WordPress run out of memory?
Every PHP request gets a fixed memory allowance. When a plugin, import, image resize or poorly written query needs more than that, PHP stops and prints:
Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 4096 bytes) in /wp-includes/class-wp-query.php on line 1234
The number in the message tells you the current limit in bytes (41,943,040 bytes is 40 MB; 134,217,728 is 128 MB). Page builders, backup plugins, large WooCommerce catalogs and big media imports are the typical memory-hungry jobs. Stores often need a higher ceiling than blogs, and 256 MB is a common recommendation for WooCommerce.
How to increase the WordPress PHP memory limit
Use whichever of these your host allows. They are listed from most to least preferred.
Option 1: wp-config.php (add above the “stop editing” comment):
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // used in wp-admin tasks
Option 2: php.ini or .user.ini in the site root:
memory_limit = 256M
Option 3: .htaccess (only on Apache with mod_php; it triggers a 500 elsewhere):
php_value memory_limit 256M
If nothing changes, your host is capping the value at server level. The PHP manual entry for memory_limit explains why, and you will need to ask the host to raise it or upgrade your plan. You can confirm the active value from Tools > Site Health > Info > Server.
Updating memory settings in wp-config.php
WP_MEMORY_LIMIT controls front-end requests, while WP_MAX_MEMORY_LIMIT applies to admin-side jobs such as image processing. Neither can exceed the server’s own memory_limit, so setting 512M in WordPress while the server allows 128M changes nothing.
Identifying plugins or themes that consume too much memory
Raising the limit hides the symptom; finding the cause fixes it. Install Query Monitor to see memory usage and slow queries per request, or measure it yourself with a temporary line in a must-use plugin:
add_action( 'shutdown', function () {
error_log( 'Peak memory: ' . round( memory_get_peak_usage( true ) / 1048576, 1 ) . ' MB on ' . $_SERVER['REQUEST_URI'] );
} );
If a normally stable site suddenly begins eating memory, treat it as a warning. Compromised sites often run hidden scripts, so scan for malware and follow our guide on how to recover a hacked WordPress site if anything looks suspicious.
7. 404 Not Found Error
Why do WordPress pages return a 404 error?
If your homepage works but posts, pages or product URLs return 404 Not Found, the content almost certainly still exists. WordPress is failing to translate the pretty URL into a database query. Typical causes are stale rewrite rules after changing permalinks or registering a custom post type, a missing or damaged .htaccess, a server without mod_rewrite enabled, or a plugin that overrides rewrite rules. A 404 also appears when a link simply points to the wrong URL, so check for typos first.
How to fix broken permalinks
- Go to Settings > Permalinks.
- Do not change anything. Just click Save Changes.
- Reload the page that returned 404.
This flushes the rewrite rules and rewrites .htaccess, and it fixes the majority of cases, including 404s on new custom post types and WooCommerce product, cart or checkout pages.
Resetting WordPress rewrite rules
You can also flush rules from the command line, which also regenerates .htaccess when you add –hard:
wp rewrite flush --hard
wp rewrite list
If you register custom post types in code, flush only once on plugin activation, never on every page load, which slows the site:
function myplugin_activate() {
myplugin_register_book_cpt(); // your register_post_type() wrapper
flush_rewrite_rules();
}
register_activation_hook( __FILE__, 'myplugin_activate' );
Checking .htaccess configuration and redirects
Confirm the WordPress block from the 500 error section exists in your .htaccess, and that nothing above it redirects in a loop. On Apache, AllowOverride All must be set for your site’s directory or .htaccess is ignored. On Nginx, make sure the try_files rule shown earlier is in place. Finally, if a URL really is gone, set up a 301 redirect instead of leaving visitors and search engines on a dead page.
8. Connection Timed Out Error
What causes WordPress connection timeouts?
A connection timed out error means the server did not answer within the time limit. Usually your site is trying to do more work than the server can finish: heavy plugins, large imports, slow external API calls, or a shared server so crowded that your site gets starved of CPU. It often hits wp-admin first because admin pages do more work than cached public pages.
How to fix the connection timed out error
- Deactivate plugins and switch to a default theme to see whether load drops.
- Check the host’s status and resource usage panel for CPU or I/O throttling.
- Turn on page caching so public pages are served without running PHP.
- Disable plugins that call remote services on every request.
- Upgrade the hosting plan if resource limits are the root cause.
Increasing PHP execution time
For long-running tasks such as imports or backups, extend the allowed time. Try the PHP setting first:
; php.ini or .user.ini
max_execution_time = 300
For web servers that sit in front of PHP, the proxy timeout may be the real limit:
# Nginx
fastcgi_read_timeout 300;
# Apache
Timeout 300
A per-request override is also possible at the top of a custom script with set_time_limit( 300 );, but a higher limit only buys time. Slow code still needs fixing.
Identifying resource-heavy plugins and server issues
Use Query Monitor or your host’s process monitor to find slow database queries and expensive hooks. Typical offenders are related-post plugins, broken-link checkers, security scanners and backups running during peak hours. WooCommerce stores should also check scheduled actions (WooCommerce > Status > Scheduled Actions) because a backlog of failed or pending jobs can lock up PHP workers. Schedule heavy jobs for off-peak hours.
9. WordPress Plugin Conflicts and Fatal Errors
How plugin conflicts affect WordPress websites
Two plugins can declare the same function, load incompatible versions of the same library, or fight over the same hook. A plugin can also break on a new PHP or WordPress version. The result ranges from a small visual glitch to a full fatal error such as Cannot redeclare function_name() or Uncaught Error: Call to undefined function.
How to identify a problematic plugin
- Think about what changed last. The newest update or install is the prime suspect.
- Check the debug log (see the debug mode section). The file path in the fatal error names the plugin folder.
- Use binary search. Deactivate half your plugins, test, then narrow down the half that fixes it. This is faster than going one by one on large sites.
- Check Site Health (Tools > Site Health) for PHP version and compatibility warnings.
Deactivating plugins without dashboard access
You already saw the folder-rename method. Two more options:
# Deactivate one plugin with WP-CLI
wp plugin deactivate woocommerce-some-addon
# Deactivate all plugins directly in the database (back up first!)
UPDATE wp_options SET option_value = 'a:0:{}' WHERE option_name = 'active_plugins';
Change wp_ to your real table prefix, shown as $table_prefix in wp-config.php. You can also run WP-CLI against a site that shows a fatal error by adding –skip-plugins –skip-themes to any command.
Troubleshooting theme and plugin compatibility issues
Before updating, check each plugin’s “Tested up to” and “Requires PHP” values on its WordPress.org page or changelog. Update one component at a time on a staging site, and read the changelog of major releases. The same care applies to your theme: when you upgrade a WordPress theme, test checkout, forms and custom templates before pushing live.
Using WordPress Recovery Mode to fix fatal errors
If you received the recovery mode email described earlier, click the link, log in, and WordPress shows exactly which plugin or theme crashed. Deactivate it there, and then exit recovery mode. Only you see the paused state, so visitors are not affected while you fix it. Recovery mode cannot catch every error (a syntax error in wp-config.php still kills everything), but it handles most plugin fatal errors gracefully.
10. WordPress Database Errors
Common WordPress database error messages
| Message | What it usually means |
|---|---|
| Error establishing a database connection | Credentials wrong or server down (see section 4) |
| One or more database tables are unavailable | Corrupted or missing tables; run the repair tool |
| WordPress database error Table ‘x’ doesn’t exist | Wrong table prefix or a failed migration |
| MySQL server has gone away | Query too large or max_allowed_packet too small |
| Got error 28 from storage engine | Disk is full |
| Table is marked as crashed and should be repaired | MyISAM table crash; repair or convert to InnoDB |
How to repair WordPress database tables
Use the WP_ALLOW_REPAIR method from earlier, or run SQL directly in phpMyAdmin:
REPAIR TABLE wp_posts;
OPTIMIZE TABLE wp_posts;
-- InnoDB tables are rebuilt with:
ALTER TABLE wp_posts ENGINE=InnoDB;
For routine cleanup, optimization and backups, the plugins in our list of WordPress database plugins automate this safely.
Checking database permissions and credentials
The database user needs permission to read and write. If you moved hosts and see Access denied, re-grant privileges:
GRANT ALL PRIVILEGES ON your_database.* TO 'your_user'@'localhost';
FLUSH PRIVILEGES;
If errors appear only after a restore, verify that $table_prefix in wp-config.php matches the prefix of the imported tables.
Preventing database corruption
- Use InnoDB tables, which handle crashes better than MyISAM.
- Keep disk space free (at least 20 percent) and monitor inode usage.
- Schedule automated, off-site backups and test a restore at least once.
- Clean transients and post revisions so the database does not bloat.
- Avoid killing PHP or MySQL processes mid-write, for example during a large import.
11. WordPress Stuck in Maintenance Mode
Why WordPress gets stuck in maintenance mode
When you update core, a plugin or a theme, WordPress creates a temporary file named .maintenance in the site root and shows “Briefly unavailable for scheduled maintenance. Check back in a minute.” If the update is interrupted by a closed browser tab, timeout, or server error, the file is never deleted and the message stays. Newer WordPress versions ignore a stale file after about ten minutes, but older setups and some caching layers keep serving it.
How to remove the .maintenance file
Connect by SFTP, enable “show hidden files”, and delete .maintenance from the folder that contains wp-config.php. Or use the command line:
rm /path/to/wordpress/.maintenance
# Or with WP-CLI
wp maintenance-mode status
wp maintenance-mode deactivate
Afterwards, clear your caching plugin and browser cache, and rerun the failed update. If the update was a plugin, verify it was not left half-installed by comparing its folder against a fresh download.
Preventing maintenance mode issues during updates
- Update plugins in small batches rather than all at once.
- Do not close the browser tab while an update runs.
- Use WP-CLI for large sites: wp plugin update –all does not depend on the browser.
- Make sure PHP’s execution time and memory limits are high enough for big updates.
- Take a backup first and keep a staging copy for major version jumps.
12. WordPress Image Upload Errors
Common causes of image upload failures
Upload problems show up as “HTTP error”, “Unable to create directory wp-content/uploads/…”, “The uploaded file exceeds the upload_max_filesize directive”, or a thumbnail that never appears. The causes fall into a few groups: wrong permissions or ownership on the uploads folder, a full disk, PHP upload limits, low memory while resizing, an image library (Imagick) problem, or a security plugin or firewall blocking the request.
Fixing HTTP errors during image uploads
The generic “HTTP error” is usually memory or image-library related. First, raise memory and try again. If it persists, force WordPress to use the GD library instead of Imagick:
add_filter( 'wp_image_editors', function () {
return array( 'WP_Image_Editor_GD' );
} );
Also try a smaller image, a different file format, and temporarily disable security and optimization plugins to check whether one of them blocks the request.
Resolving file permission and upload size issues
Make sure the uploads directory is writable by the web server user:
chmod 755 wp-content/uploads
chown -R www-data:www-data wp-content/uploads # user may differ by host
To allow bigger files, increase these two values in php.ini or .user.ini, keeping post_max_size larger than upload_max_filesize:
upload_max_filesize = 64M
post_max_size = 64M
Our step-by-step guide to the maximum upload file size in WordPress covers every method, including Multisite and Nginx’s client_max_body_size.
Checking PHP memory and server configuration
Resizing a 6000-pixel photo into several thumbnails can use hundreds of megabytes. Set WP_MAX_MEMORY_LIMIT to 512M as shown earlier, compress images before uploading, and consider a lower “big image” threshold. Finally, confirm disk space and inode quota with your host; a full disk produces the same upload error as a permissions problem.
13. WordPress Failed Auto-Upgrade
Why WordPress updates fail
Automatic updates fail when WordPress cannot write files, reach WordPress.org, or finish before a timeout. Common messages are “Update failed: Another update is currently in progress”, “Could not copy file”, “Download failed. cURL error 28” and “Installation failed: Could not create directory”. Typical reasons: wrong file ownership, a full disk, firewall rules blocking outbound requests, low execution time, or a previous update that crashed.
How to fix failed automatic updates
- Check free disk space and file ownership. The web server user must own, or be able to write to, wp-content, wp-admin and wp-includes.
- Look at Tools > Site Health for a failing “background updates” or “REST API” test.
- Turn on the debug log and retry to capture the exact error.
- Try the update through WP-CLI, which avoids browser timeouts:
wp core update
wp core update-db
wp core verify-checksums
Removing stale update locks
If WordPress says another update is already running, a lock left in the database is blocking you. Remove it:
wp option delete core_updater.lock
-- or in phpMyAdmin
DELETE FROM wp_options WHERE option_name = 'core_updater.lock';
Wait a few minutes after removing it, then retry the update. WordPress locks expire on their own after about fifteen minutes, but removing the option is faster.
Manually updating WordPress safely
- Back up files and database.
- Download the latest WordPress zip from WordPress.org and extract it.
- Delete the wp-admin and wp-includes folders on your server.
- Upload the new wp-admin and wp-includes folders and the loose files in the root, except wp-config.php and the wp-content folder.
- Visit /wp-admin and run any database upgrade WordPress asks for.
If you prefer to control when updates happen, set the behavior explicitly in wp-config.php or with a filter:
define( 'WP_AUTO_UPDATE_CORE', 'minor' ); // minor security releases only
add_filter( 'auto_update_plugin', '__return_false' ); // no automatic plugin updates
14. How to Enable WordPress Debug Mode
What is WordPress debug mode?
Debug mode is WordPress’s built-in way to surface PHP errors, warnings and deprecation notices that are normally hidden. It is the single most useful tool for tracking down any of the errors in this article. The constants are documented in the official Debugging in WordPress handbook.
Enabling WP_DEBUG in wp-config.php
Find the line define( ‘WP_DEBUG’, false ); in wp-config.php and replace it with the block below.
Displaying and logging PHP errors
// Safe setup for a live site: log errors, never show them to visitors
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
// Optional: send the log somewhere outside the web root
// define( 'WP_DEBUG_LOG', '/var/log/wordpress/debug.log' );
// Optional: load unminified core JS/CSS to debug admin scripts
// define( 'SCRIPT_DEBUG', true );
On a local or staging site you may want errors on screen, so set WP_DEBUG_DISPLAY to true. On a production site, never display them: errors can leak file paths and database details.
You can also write your own messages to the log from a plugin or theme:
if ( ! function_exists( 'write_log' ) ) {
function write_log( $data ) {
if ( true === WP_DEBUG ) {
error_log( is_scalar( $data ) ? $data : print_r( $data, true ) );
}
}
}
write_log( 'Checkout hook fired' );
Finding and understanding the WordPress error log
With the settings above, WordPress writes to wp-content/debug.log. Download it by SFTP or read it on the server:
tail -f wp-content/debug.log
Read each line as [date] PHP type: message in file on line N. Fatal errors and parse errors need action immediately; warnings and notices are lower priority; “deprecated” notices warn about code that will break in a future version. Start from the newest entry at the bottom and follow the file path to the responsible plugin or theme.
Disabling debug mode on a live website
Once you have fixed the problem, turn debugging off again and protect or delete the log, because it can contain sensitive data:
define( 'WP_DEBUG', false );
# .htaccess: block public access to the log (Apache 2.4)
<Files debug.log>
Require all denied
</Files>
15. More Common WordPress Errors: 403, Redirect Loops, Email and JSON
Beyond the headline errors, these five show up constantly in support forums and are rarely covered in one place.
403 Forbidden error
A 403 Forbidden means the server understood the request but refuses to allow it. The causes are a security plugin or firewall blocking your IP, wrong file permissions, a bad .htaccess rule, or a host-level restriction (ModSecurity). Rename .htaccess, disable your security plugin by renaming its folder, and confirm permissions are 755 for folders and 644 for files. If the problem is limited to one action, such as saving a post that contains certain words, ModSecurity is the usual cause, and your host can whitelist the rule.
Login redirect loop and “too many redirects”
If you enter the correct password but land back on the login screen, or the browser reports ERR_TOO_MANY_REDIRECTS, the usual causes are mismatched site URLs, bad cookies, or HTTPS detection failing behind a proxy or CDN. Clear cookies, then confirm your URLs:
wp option get home
wp option get siteurl
wp option update home 'https://example.com'
wp option update siteurl 'https://example.com'
You can also force them in wp-config.php:
define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );
Behind a load balancer or reverse proxy that terminates SSL, tell WordPress the request was secure, above the “stop editing” line:
if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 'https' === $_SERVER['HTTP_X_FORWARDED_PROTO'] ) {
$_SERVER['HTTPS'] = 'on';
}
If you changed domains and still cannot log in, see how to change the URL in the WordPress database. If the password itself is the issue, our guide to a WordPress admin password reset shows four ways in.
WordPress not sending email
By default WordPress sends mail through the server’s PHP mail() function, which many hosts disable and many inboxes distrust. Test it first:
wp eval 'var_dump( wp_mail( "you@example.com", "Test", "It works" ) );'
If it returns false or the message never arrives, send mail through authenticated SMTP using a mail plugin and set up SPF, DKIM and DMARC records for your domain. This matters for WooCommerce stores in particular, where order confirmations and password resets are business-critical.
“Updating failed. The response is not a valid JSON response”
This block editor error means the REST API returned something other than JSON, usually an HTML error page, a PHP warning printed into the response, or a blocked request. Fix it in this order: resave permalinks, check that home and siteurl match, disable security and caching plugins, and turn off PHP error display so warnings do not corrupt the response. Check Tools > Site Health for a failing REST API test.
“The link you followed has expired”
This appears when you upload a theme or plugin larger than your PHP limit. Raise upload_max_filesize, post_max_size and max_execution_time using the snippets shown earlier, or upload the theme by SFTP instead.
16. How to Prevent the Most Common WordPress Errors
Keep WordPress core, themes and plugins updated
Most real-world breakage comes from outdated code colliding with a newer PHP version, or from known vulnerabilities being exploited. Apply security releases quickly, and update everything else weekly. Remove plugins and themes you do not use, since inactive code can still be attacked. Check the official WordPress requirements so your PHP and database versions stay supported.
Create regular website backups
A backup is the only fix that always works. Keep daily database backups and at least weekly file backups, stored off the server, and keep several restore points. Test a restore on staging; an untested backup is only a hope.
Use compatible and trusted plugins
Prefer plugins with recent updates, many active installs, and a “Tested up to” version that matches your WordPress release. Fewer, better plugins mean fewer conflicts. Follow our WordPress security checklist for a full hardening routine that also reduces the chance of errors caused by malicious code.
Monitor PHP memory limits and server resources
Review Tools > Site Health monthly. Keep memory_limit at 256 MB or more for stores and builders, use a supported PHP version, enable object caching where possible, and watch CPU and disk usage from your host’s dashboard.
Choose reliable WordPress hosting
Cheap, oversubscribed hosting causes timeouts, database drops and mysterious 500 errors. Look for current PHP versions, SSH and WP-CLI, daily backups, staging, and real resource limits stated in plain numbers.
Monitor error logs and website performance
- Review the server error log and debug.log weekly, and set an alert for fatal errors.
- Use uptime monitoring that checks a real page and the checkout, not only the homepage.
- Test forms, login, and the WooCommerce checkout after every update.
- Keep a short changelog of what you changed and when, so the “last thing we changed” is never a mystery.
17. Frequently Asked Questions (FAQs)
What are the most common WordPress errors?
The most common WordPress errors are the White Screen of Death, the 500 Internal Server Error, “Error establishing a database connection”, PHP parse and syntax errors, memory exhausted errors, 404 Not Found pages, connection timeouts, plugin conflicts, stuck maintenance mode, image upload failures and failed auto-updates.
How do I fix a WordPress error without access to the dashboard?
Use SFTP, your host’s File Manager, SSH or WP-CLI. Rename the plugins folder to deactivate all plugins, rename the active theme folder to fall back to a default theme, edit wp-config.php to enable debugging or raise memory, and rename .htaccess to rebuild it. None of these need dashboard access.
Why is my WordPress website showing a white screen?
A white screen is almost always a PHP fatal error that is not being displayed. The usual causes are a plugin or theme conflict, an exhausted memory limit or a syntax error in recently edited code. Turn on WP_DEBUG_LOG and read wp-content/debug.log to find the exact file.
How do I fix a WordPress 500 Internal Server Error?
Check the server error log, rename .htaccess to let WordPress regenerate it, deactivate plugins by renaming the plugins folder, raise the PHP memory limit, and confirm file permissions are 755 for folders and 644 for files. If the error remains, ask your host to check PHP and server logs.
Where can I find WordPress error logs?
WordPress writes to wp-content/debug.log when WP_DEBUG_LOG is enabled. Server errors live in your host’s Error Log tool or in files such as /var/log/apache2/error.log and /var/log/nginx/error.log. PHP-FPM may keep its own log as well.
How do I enable debug mode in WordPress?
Edit wp-config.php and set WP_DEBUG to true, WP_DEBUG_LOG to true and WP_DEBUG_DISPLAY to false. Reproduce the problem, read the log, then set WP_DEBUG back to false and restrict access to the log file.
Can a plugin cause WordPress to stop working?
Yes. A faulty, outdated or conflicting plugin can trigger a white screen, 500 error, timeouts, memory errors or a broken admin. Deactivating the plugin, by renaming its folder if needed, normally restores the site immediately.
Do I need a developer to fix WordPress errors?
Not for most of them. Permalink, maintenance mode, memory, plugin and .htaccess problems are routine fixes if you have file access and a backup. Call a developer or your host when the error persists after you have disabled plugins and themes, when the database is damaged, or when you suspect a hack.
Can WooCommerce cause WordPress errors?
WooCommerce is not buggy by nature, but stores use more memory, database queries and scheduled tasks than a simple blog. Low memory, backed-up scheduled actions and add-on conflicts are the usual triggers, so give stores at least 256 MB of PHP memory and update add-ons one at a time.
18. Conclusion: Troubleshooting WordPress Errors Effectively
Every error in this guide comes down to the same routine: back up, read the message, find the layer, change one thing, test. The White Screen of Death, HTTP 500 errors, database connection failures, parse errors, memory limits, 404s and timeouts all look alarming, yet the fix is usually a plugin rename, a few lines in wp-config.php or a refreshed .htaccess.
Make debug logging your first move, keep file access ready, and build the habit of testing updates on a staging copy. Do that and the next “my site is down” moment will cost you minutes, not an afternoon. Bookmark this page, share it with your team or clients, and keep the quick reference table handy for the day something breaks.


