WordPress is incredibly user-friendly, but like any software, you’ll occasionally encounter errors. The good news? Most WordPress errors have simple solutions. This comprehensive guide covers the 15 most common WordPress errors and how to fix them quickly.
Whether you’re seeing the “White Screen of Death,” “Error Establishing Database Connection,” or other frustrating messages, this troubleshooting guide will help you get your site back online.
Before You Start Troubleshooting
1. Create a Complete Backup
Before making any changes, backup your entire site:
- Database export (via phpMyAdmin or plugin)
- All WordPress files (via FTP or hosting file manager)
- Store backups in multiple locations
Recommended backup plugins: UpdraftPlus, BlogVault, Duplicator
2. Enable WordPress Debug Mode
Debug mode reveals detailed error messages. Edit wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );
Errors will be logged to /wp-content/debug.log
3. Have These Tools Ready
- FTP client (FileZilla)
- Access to hosting control panel (cPanel)
- phpMyAdmin access
- Text editor (Notepad++, Sublime Text)
1. White Screen of Death (WSOD)
Symptoms:
Blank white screen with no error message on frontend, backend, or both.
Causes:
- PHP memory limit exhausted
- Plugin or theme conflict
- Corrupted files
- Syntax error in code
Solutions:
1. Increase PHP Memory Limit
Add to wp-config.php (before “stop editing” line):
define( 'WP_MEMORY_LIMIT', '256M' );
2. Disable All Plugins
Via FTP, rename /wp-content/plugins/ to /wp-content/plugins-disabled/
If site works, rename back and disable plugins one-by-one to find culprit.
3. Switch to Default Theme
Via phpMyAdmin, run this query:
UPDATE wp_options SET option_value = 'twentytwentyfour' WHERE option_name = 'template' OR option_name = 'stylesheet';
4. Enable WP_DEBUG
This reveals the actual error for targeted fixing.
2. Error Establishing Database Connection
Symptoms:
“Error establishing a database connection” message on all pages.
Causes:
- Incorrect database credentials
- Database server down
- Corrupted database
- Hosting issues
Solutions:
1. Verify Database Credentials
Check wp-config.php for correct values:
define( 'DB_NAME', 'database_name' );
define( 'DB_USER', 'database_user' );
define( 'DB_PASSWORD', 'database_password' );
define( 'DB_HOST', 'localhost' );
Verify these match your hosting control panel database settings.
2. Check Database Server
Create a file named testconnection.php in your root directory:
If this shows an error, contact your host – database server may be down.
3. Repair Database
Add to wp-config.php:
define( 'WP_ALLOW_REPAIR', true );
Visit: yoursite.com/wp-admin/maint/repair.php
Remove the line after repair completes.
3. Internal Server Error (500 Error)
Symptoms:
“Internal Server Error” or “500 Error” message.
Causes:
- Corrupted .htaccess file
- PHP memory limit exceeded
- Plugin conflict
- File permission issues
Solutions:
1. Regenerate .htaccess
Via FTP, rename .htaccess to .htaccess-old
Go to Settings > Permalinks in WordPress and click “Save Changes” (creates new .htaccess)
2. Increase PHP Memory
Add to wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
3. Check Server Error Logs
In cPanel > Error Logs, identify the specific error causing the 500 code.
4. 404 Error – Page Not Found
Symptoms:
Pages or posts show “404 Not Found” even though they exist.
Causes:
- Permalink structure issues
- Corrupted .htaccess
- Missing pages
Solutions:
1. Reset Permalinks
Go to Settings > Permalinks > Click “Save Changes” (no changes needed)
This regenerates rewrite rules.
2. Restore .htaccess
Delete current .htaccess via FTP, then reset permalinks to create new one.
5. WordPress Login Page Refreshing or Redirecting
Symptoms:
Cannot login – page refreshes or redirects to login page again.
Causes:
- Incorrect site URL settings
- Cookie issues
- File permission problems
Solutions:
1. Clear Browser Cookies
Clear all cookies for your domain.
2. Verify Site URLs
Add to wp-config.php:
define( 'WP_HOME', 'https://yoursite.com' );
define( 'WP_SITEURL', 'https://yoursite.com' );
3. Reset Password via Database
In phpMyAdmin, go to wp_users table, edit your user, and set user_pass to MD5 hash of new password.
6. Locked Out of WordPress Admin (wp-admin)
Symptoms:
Cannot access /wp-admin/ – various errors or blank pages.
Solutions:
1. Reset Password via Email
Use “Lost your password?” link on login page.
2. Reset Password via phpMyAdmin
Edit user in wp_users table, set new password using MD5 function.
3. Add New Admin User via FTP
Add this code to functions.php (remove after creating user):
function create_admin_user() {
$username = 'newadmin';
$password = 'strong_password_here';
$email = 'admin@yoursite.com';
if ( !username_exists( $username ) ) {
wp_create_user( $username, $password, $email );
$user = get_user_by( 'login', $username );
$user->set_role( 'administrator' );
}
}
add_action( 'init', 'create_admin_user' );
7. Failed Auto-Update or Maintenance Mode Stuck
Symptoms:
“Briefly unavailable for scheduled maintenance” message won’t go away.
Cause:
WordPress creates a .maintenance file during updates. If update fails, file remains.
Solution:
Via FTP, delete .maintenance file from root directory.
That’s it! Site should work immediately.
8. Connection Timed Out Error
Symptoms:
“Connection timed out” or site loads partially then times out.
Causes:
- PHP memory limit too low
- Resource-intensive plugin
- Shared hosting limitations
Solutions:
1. Increase PHP Memory and Max Execution Time
Add to wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
ini_set( 'max_execution_time', '300' );
2. Disable Plugins
Deactivate all plugins, then reactivate one-by-one to identify culprit.
3. Upgrade Hosting
If on cheap shared hosting, consider upgrading to SiteGround, Cloudways, or Kinsta.
9. Maximum Execution Time Exceeded
Symptoms:
“Maximum execution time of 30 seconds exceeded” error.
Cause:
Script taking too long to execute (usually during imports or large operations).
Solutions:
1. Increase via wp-config.php
set_time_limit(300);
2. Increase via .htaccess
php_value max_execution_time 300
3. Contact hosting to increase server limit
10. Memory Exhausted Error
Symptoms:
“Fatal error: Allowed memory size of X bytes exhausted”
Cause:
Script using more memory than PHP allows.
Solution:
Increase PHP memory limit in wp-config.php:
define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
11. Are You Sure You Want to Do This? (Nonce Error)
Symptoms:
“Are you sure you want to do this?” message when performing actions.
Causes:
- Plugin conflict
- Security plugin blocking requests
- Incorrect WordPress URLs
Solutions:
1. Verify Site URLs
Ensure WordPress Address and Site Address in Settings > General are correct.
2. Clear Cache and Cookies
3. Disable Security Plugins Temporarily
4. Check for Plugin Conflicts
12. Missed Schedule Error (Posts Not Publishing)
Symptoms:
Scheduled posts show “Missed Schedule” instead of publishing.
Causes:
- Server timezone issues
- Caching interference
- Low traffic (WordPress cron needs visits to trigger)
Solutions:
1. Set Correct Timezone
Settings > General > Timezone (select city in your timezone)
2. Use WP Crontrol Plugin
Install WP Crontrol to manage scheduled events properly.
3. Disable WP Cron, Use Real Cron
Add to wp-config.php:
define('DISABLE_WP_CRON', true);
Then set up real cron job in cPanel to run every 15 minutes:
*/15 * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
13. Sidebar Below Content (Layout Issues)
Symptoms:
Sidebar appears below main content instead of beside it.
Causes:
- Unclosed HTML div tags
- CSS conflicts
- Theme issues
Solutions:
1. Validate HTML
Use W3C Validator to find unclosed tags.
2. Switch to Default Theme
If problem disappears, issue is in your theme.
3. Check Recent Post Content
Often caused by unclosed div in post content. Edit recent posts and check HTML.
14. Syntax Error
Symptoms:
“Parse error: syntax error, unexpected…” in specific file.
Cause:
Typo or incorrect code in PHP file.
Solution:
Error message shows exact file and line number. Via FTP:
- Download the file
- Go to specified line number
- Fix the syntax error (missing semicolon, unclosed parenthesis, etc.)
- Upload corrected file
If you recently edited the file, restore from backup.
15. Images Not Uploading
Symptoms:
Cannot upload images to media library – various error messages.
Causes:
- File permission issues
- Incorrect folder ownership
- PHP file upload limits
- Mod_security blocking uploads
Solutions:
1. Fix File Permissions
Set /wp-content/uploads/ to 755 (folders) and 644 (files)
2. Increase Upload Limits
Add to wp-config.php:
@ini_set( 'upload_max_filesize' , '64M' );
@ini_set( 'post_max_size', '64M');
3. Check .htaccess for mod_security Rules
Temporarily disable mod_security to test:
SecFilterEngine Off
SecFilterScanPOST Off
General WordPress Troubleshooting Tips
1. Always Backup First
Before any fixes, create full backup.
2. Check Plugin/Theme Conflicts
80% of WordPress errors are caused by plugin or theme conflicts.
3. Enable Debug Mode
Detailed errors help identify root causes.
4. Check Error Logs
cPanel > Error Logs shows PHP and server errors.
5. Update Everything
Outdated WordPress, plugins, or themes cause many issues.
6. Use Quality Hosting
Many errors stem from cheap, overcrowded shared hosting. Consider SiteGround, Cloudways, or Kinsta.
7. Search WordPress.org Forums
Chances are someone else encountered the same error.
8. Contact Your Host
Server-related errors require hosting support.
Essential WordPress Troubleshooting Plugins
1. Health Check & Troubleshooting
Official plugin for testing plugin conflicts without affecting visitors.
2. WP Rollback
Rollback plugins to previous versions if updates cause issues.
3. Query Monitor
Debug database queries, PHP errors, and performance issues.
4. WP-DBManager
Backup, restore, and optimize database.
When to Hire a Professional
Consider professional help if:
- Site is completely down and you can’t fix it
- Site is hacked or infected with malware
- Database is corrupted beyond repair
- Custom code modifications needed
- Migration to new host required
Many premium hosts offer free migration and expert support: Kinsta, Cloudways, SiteGround
Preventing Future Errors
- Regular backups: Daily automated backups with UpdraftPlus or BlogVault
- Keep everything updated: WordPress core, themes, plugins
- Use quality plugins: Avoid nulled/pirated plugins
- Quality hosting: Invest in reliable hosting
- Staging environment: Test changes before applying to live site
- Security plugin: Wordfence or Sucuri for protection
- Monitor uptime: UptimeRobot alerts you to downtime
- Regular maintenance: Clean database, optimize images, remove unused plugins
Conclusion: Most Errors Are Fixable
WordPress errors are frustrating, but most have straightforward solutions. With this troubleshooting guide, you can resolve the most common issues quickly and get your site back online.
Quick troubleshooting checklist:
- Backup your site
- Enable debug mode
- Check error logs
- Disable plugins
- Switch to default theme
- Increase PHP limits
- Regenerate .htaccess
- Contact hosting support if needed
Remember: reliable hosting prevents many issues. Consider upgrading to SiteGround for excellent support, Kinsta for premium performance, or Hostinger for budget-friendly reliability.
Bookmark this guide for quick reference when errors occur. Happy troubleshooting!
Disclosure: This article contains affiliate links. If you purchase through our links, we may earn a commission at no extra cost to you. Read our full affiliate disclosure.