Common WordPress Errors at a Glance
Use this table to quickly identify your error and jump to the right fix.
| Error | Severity | Most Likely Cause | Quick Jump |
|---|---|---|---|
| WSOD White Screen | High | Plugin conflict, low PHP memory | → Fix it |
| 500 Server Error | High | Corrupted .htaccess, memory limit | → Fix it |
| DB Database Error | High | Wrong credentials, corrupted tables | → Fix it |
| 403 Forbidden | Medium | Bad .htaccess, wrong file permissions | → Fix it |
| 404 Not Found | Medium | Broken permalinks, .htaccess missing | → Fix it |
| SSL Mixed Content | Medium | Hardcoded HTTP URLs in database | → Fix it |
| 413 Upload Error | Low | PHP upload_max_filesize too small | → Fix it |
| LOGIN Locked Out | High | Lost password, wrong site URL | → Fix it |
Before You Start: Back Up First
Never touch wp-config.php, the database, or core files without a recent backup. A few minutes now prevents hours of disaster recovery later.
Every hosting platform offers a way to back up. Here's where to find it on the major ones:
- cPanel hosts (Bluehost, HostGator, SiteGround, etc.): cPanel → Backup Wizard or JetBackup
- WP Engine: Sites → your site → Backup Points → Create New Backup Point
- Kinsta: Dashboard → Backups → Download
- Cloudways: Application → Backup & Restore → Create Backup
- Flywheel / Local: Sites → Backups → Create Backup
- Any host: Install UpdraftPlus and run a manual backup now
This guide is written by developers with 10+ years of WordPress experience spanning thousands of production site troubleshooting sessions across every major hosting provider.
Step 1: Enable WordPress Debug Mode
Debug mode reveals hidden error messages that point you directly to the problem. This is the single most important troubleshooting step.
Never display raw PHP errors to the public — it reveals your site structure to attackers. Use WP_DEBUG_LOG instead and read errors from /wp-content/debug.log via FTP.
How to Access wp-config.php
Connect via FTP or File Manager
Use an FTP client (FileZilla, Cyberduck) or your hosting panel's File Manager. Connect to your server and navigate to the WordPress root folder (usually public_html).
Find wp-config.php
It's in the root of your WordPress install, the same folder as wp-admin, wp-content, and wp-includes. Right-click → Edit in File Manager, or download, edit locally, re-upload via FTP.
Add the debug constants
Paste the code shown above before the line that says /* That's all, stop editing! */. Save the file.
Read the debug log
Navigate to /wp-content/debug.log via FTP to read the error messages. This file tells you exactly which file, line number, and function caused the problem.
The White Screen of Death (WSOD)
A blank white screen in WordPress — with no error message — means PHP encountered a fatal error but debug mode is off. Here's how to diagnose and fix it.
/wp-content/plugins/ to /wp-content/plugins_disabled/ — this deactivates everything without needing the dashboard./wp-content/themes/. WordPress will fall back to the next available theme. If this fixes it, the theme is the cause.define( 'WP_MEMORY_LIMIT', '256M' ); to wp-config.php above the stop editing comment.500 Internal Server Error
The 500 error means something went wrong on the server, but it won't tell you what. The three most common causes are a corrupted .htaccess file, exhausted PHP memory, or a broken plugin/theme.
500 Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Apache/2.4 Server at yoursite.com Port 443
Fix 1: Reset .htaccess
This is the most common cause. Via FTP, rename .htaccess to .htaccess_old, then go to Settings → Permalinks in your dashboard and click Save Changes to regenerate a clean one.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Fix 2: Increase PHP Memory via .htaccess
php_value memory_limit 256M php_value max_execution_time 300 php_value upload_max_filesize 64M php_value post_max_size 64M
WP Engine, Kinsta, and some VPS hosts use Nginx, which doesn't read .htaccess. Use wp-config.php constants or your hosting panel's PHP settings instead.
Error Establishing a Database Connection
This error means WordPress cannot connect to your MySQL database. It could be wrong credentials, a crashed database server, or corrupted tables.
Error Establishing a Database Connection
This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost.
Step 1: Verify Credentials in wp-config.php
// These MUST match exactly what's in your hosting panel define( 'DB_NAME', 'your_database_name' ); // check cPanel → MySQL Databases define( 'DB_USER', 'your_db_username' ); define( 'DB_PASSWORD', 'your_db_password' ); define( 'DB_HOST', 'localhost' ); // try 127.0.0.1 if localhost fails
Step 2: Use phpMyAdmin to Check the Database
| Table | Op | Msg_type | Msg_text |
|---|---|---|---|
| wp_options | repair | status | OK |
| wp_posts | repair | status | OK |
| wp_postmeta | repair | warning | 1 client is using or hasn't closed the table properly |
Step 3: Use the WordPress Database Repair Tool
Add this line to wp-config.php, then visit the repair URL. Remove it immediately after use.
define( 'WP_ALLOW_REPAIR', true ); // Then visit: https://yoursite.com/wp-admin/maint/repair.php
WordPress Login & Lock-out Issues
Can't access your WordPress dashboard? Here are three escalating methods to regain access — try them in order.
Method 1: Reset Password by Email
Go to yoursite.com/wp-login.php and click "Lost your password?" Enter your email or username and check your inbox for a reset link.
Method 2: Reset Password via phpMyAdmin
Open phpMyAdmin
Log in to cPanel → Databases → phpMyAdmin. Select your WordPress database from the left sidebar.
Open the wp_users table
Click on wp_users (your prefix may differ). Find your admin account row and click Edit.
Update the user_pass field
In the user_pass field, change the Function dropdown to MD5 and type your new password in the Value field. Click Go.
Method 3: Fix Incorrect Site URL (causes redirect loops)
// Force the correct URLs — remove after you fix in Settings define( 'WP_HOME', 'https://yoursite.com' ); define( 'WP_SITEURL', 'https://yoursite.com' );
Once you're back in the dashboard, go to Settings → General and set the correct Site Address and WordPress Address there, then remove the WP_HOME/WP_SITEURL lines from wp-config.php.
Diagnosing Plugin & Theme Conflicts
Plugin conflicts are the #1 cause of WordPress issues. The method below isolates the problem without losing your content or settings.
| Plugin | Status | Action |
|---|---|---|
| Contact Form 7 | Active | Deactivate |
| WooCommerce | Active | Deactivate |
| ⚠️ Broken Plugin | Inactive | Activate |
| Yoast SEO | Active | Deactivate |
| UpdraftPlus | Active | Deactivate |
Systematic Conflict Isolation
Deactivate all plugins at once
In the Plugins list, check the checkbox at the top to select all, then from the Bulk Action dropdown choose "Deactivate" and click Apply. If you can't access the dashboard, rename the plugins folder via FTP.
Test your site
Does the problem disappear? If yes, a plugin is the cause. If no, move on to testing your theme.
Reactivate plugins one by one
Enable each plugin individually and test after each one. When the problem returns, you've found your culprit. Report the issue to the plugin developer.
Test the theme
If plugins are clear, switch to a default WordPress theme (Twenty Twenty-Four) via Appearance → Themes. If this fixes it, your theme has the bug — contact the theme developer or add the fix to a child theme.
PHP Memory Limit Errors
WordPress processes use PHP memory. When the limit is exceeded, you get a blank screen or an error saying "Allowed memory size exhausted." Fix it by increasing the limit.
Method 1: Via wp-config.php (Works Everywhere)
define( 'WP_MEMORY_LIMIT', '256M' ); // for front-end define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // for admin area
Method 2: Via php.ini (VPS/Dedicated)
memory_limit = 256M max_execution_time = 300 upload_max_filesize = 64M post_max_size = 64M max_input_vars = 3000
Verify Your Current Memory Usage
Install the Query Monitor plugin and look at the "Overview" tab — it shows PHP memory usage per page load.
.htaccess & Permalink Issues
Broken permalinks or 404 errors on posts/pages (while the homepage works) are nearly always a .htaccess problem.
Quick Fix: Flush Permalinks
Go to Settings → Permalinks
In your WordPress admin dashboard, navigate to Settings → Permalinks. You don't need to change anything.
Click "Save Changes"
This regenerates the .htaccess file with fresh rewrite rules. Test your site immediately after — this usually resolves 404s on posts/pages.
WP Engine, Kinsta, and Nginx-based hosts handle URL rewriting at the server config level. If you have permalink issues there, contact support — they'll update the server rules for you.
Media Upload Errors
Can't upload images or files? There are two common culprits: file size limits, and wrong folder permissions.
Fix 1: Increase Upload Size Limits
php_value upload_max_filesize 128M php_value post_max_size 128M php_value max_execution_time 300 php_value max_input_time 300
Fix 2: Fix /wp-content/uploads/ Permissions
chmod 755 wp-content/uploads/ find wp-content/uploads/ -type d -exec chmod 755 {} \; find wp-content/uploads/ -type f -exec chmod 644 {} \; # If you see "HTTP error" on image upload, also run: chown -R www-data:www-data wp-content/uploads/
SSL & Mixed Content Warnings
If your site has HTTPS but shows a padlock with a warning, mixed content is the problem — some resources are still loading over HTTP.
Fix: Update URLs in the Database
Use the Better Search Replace plugin, or run this SQL query in phpMyAdmin:
-- Run this AFTER taking a full database backup UPDATE wp_options SET option_value = replace(option_value, 'http://yoursite.com', 'https://yoursite.com'); UPDATE wp_posts SET post_content = replace(post_content, 'http://yoursite.com', 'https://yoursite.com'); UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://yoursite.com', 'https://yoursite.com');
Force HTTPS in wp-config.php
define( 'FORCE_SSL_ADMIN', true ); // If behind a load balancer or reverse proxy (Cloudflare, etc.): if ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' ) { $_SERVER['HTTPS'] = 'on'; }
Hosting-Specific Tips
Every major hosting platform has its own tools and quirks. Here's what you need to know for each one.
After 10+ years troubleshooting WordPress sites, the single most time-saving habit is having a staging environment. Every major managed host (WP Engine, Kinsta, SiteGround) offers free staging. Always reproduce your production issue on staging first — it means you can be aggressive with fixes without risking live data. If your host doesn't offer staging, use the WP Staging plugin for a free on-server staging clone.
Frequently Asked Questions
Quick answers to the most common WordPress troubleshooting questions.