Troubleshooting

How to Fix 12 Common WordPress Errors (2026 Guide)

Troubleshooting By 12 min read

Step-by-step solutions for the most common WordPress errors including white screen of death, 500 errors, database connection errors, and more.

Your WordPress site breaks at the worst possible time—right before a big launch, during high traffic, or when you’re away from your computer. While WordPress is incredibly reliable, certain errors affect nearly every site at some point.

The good news? Most WordPress errors follow predictable patterns with proven solutions. This guide walks through the 12 most common WordPress errors with step-by-step fixes you can implement immediately.

⚠️ Before You Start Troubleshooting

ALWAYS create a backup before making changes. If you don’t have a recent backup, set one up now. Troubleshooting without a safety net can make problems worse.

1. White Screen of Death (WSOD)

Symptoms: Blank white screen with no error message. Site appears completely broken.

Common Causes: Plugin conflict, theme issue, PHP memory limit exceeded, or PHP error with error display turned off.

How to Fix:

Step 1: Enable WordPress Debug Mode

Edit wp-config.php via SFTP and add these lines before “That’s all, stop editing!”:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

Reload your site. Check /wp-content/debug.log for error messages.

Step 2: Deactivate All Plugins

Via SFTP, rename /wp-content/plugins/ to /wp-content/plugins-disabled/. If the site loads, it’s a plugin conflict. Rename it back and deactivate plugins one by one to find the culprit.

Step 3: Switch to Default Theme

Via SFTP, rename /wp-content/themes/your-theme/ to temporarily disable it. WordPress will fall back to a default theme. If the site loads, your theme is the issue.

Step 4: Increase PHP Memory Limit

Add to wp-config.php:

define('WP_MEMORY_LIMIT', '256M');

✅ Prevention

Use a managed WordPress hosting provider that tests plugin and theme updates in staging before applying to production. Host Anchor’s safe update system with automatic restore points catches conflicts before they break your live site.

2. Internal Server Error (500)

Symptoms: “500 Internal Server Error” or “The website is temporarily unable to service your request.”

Common Causes: Corrupted .htaccess file, plugin/theme conflicts, exhausted PHP memory, or server configuration issues.

How to Fix:

Step 1: Fix .htaccess File

Via SFTP, rename .htaccess to .htaccess-old. Try loading your site. If it works, go to WordPress Admin > Settings > Permalinks and click “Save Changes” to generate a fresh .htaccess file.

Step 2: Check File Permissions

Correct WordPress file permissions:

  • Directories: 755 or 750
  • Files: 644 or 640
  • wp-config.php: 440 or 400

Step 3: Check Server Error Logs

Access your hosting control panel and check error logs for PHP errors or resource limit violations.

Step 4: Deactivate Plugins

Rename /wp-content/plugins/ folder via SFTP to test if a plugin is causing the issue.

3. Error Establishing Database Connection

Symptoms: “Error establishing a database connection” on both frontend and admin area.

Common Causes: Wrong database credentials in wp-config.php, database server down, corrupted database tables.

How to Fix:

Step 1: Verify Database Credentials

Open wp-config.php via SFTP and verify these values match your hosting database settings:

define('DB_NAME', 'your_database_name');
define('DB_USER', 'your_database_username');
define('DB_PASSWORD', 'your_database_password');
define('DB_HOST', 'localhost'); // Often 'localhost' but verify with host

Step 2: Test Database Connection

Create a file named test-db.php in your WordPress root with:

<?php
$link = mysqli_connect('localhost', 'db_user', 'db_password');
if (!$link) {
    die('Could not connect: ' . mysqli_error($link));
}
echo 'Connected successfully';
mysqli_close($link);
?>

Visit yoursite.com/test-db.php. If it fails, contact your host—the database server may be down.

Step 3: Repair Database Tables

Add to wp-config.php:

define('WP_ALLOW_REPAIR', true);

Visit yoursite.com/wp-admin/maint/repair.php and run repair. REMOVE this line from wp-config.php when done.

🚨 Database Down?

If your database server is down, only your hosting provider can fix it. Contact them immediately. This is why 99.9% uptime guarantees matter—database failures mean complete site outages.

4. 404 Errors After Permalink Changes

Symptoms: Homepage loads but all posts/pages show 404 Not Found errors. Often happens after changing permalink structure.

Common Causes: .htaccess not updated, mod_rewrite not enabled, or corrupt permalink settings.

How to Fix:

Step 1: Re-Save Permalinks

Go to WordPress Admin > Settings > Permalinks. Don’t change anything—just click “Save Changes.” This regenerates .htaccess rules.

Step 2: Check .htaccess Permissions

Via SFTP, verify .htaccess has 644 permissions so WordPress can write to it.

Step 3: Manually Update .htaccess

If WordPress can’t write to .htaccess, add these rules manually:

# BEGIN WordPress

RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

Step 4: Contact Host About mod_rewrite

If none of these work, your server may not have mod_rewrite enabled. Contact your host to enable it.

5. Upload File Size Limit Exceeded

Symptoms: “The uploaded file exceeds the upload_max_filesize directive in php.ini” when uploading images, themes, or plugins.

Common Causes: PHP upload limits set too low by your hosting provider.

How to Fix:

Method 1: Edit php.ini (If Accessible)

upload_max_filesize = 64M
post_max_size = 64M
max_execution_time = 300

Method 2: Edit .htaccess

Add to your .htaccess file:

php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 300

Method 3: Edit wp-config.php

@ini_set('upload_max_size', '64M');
@ini_set('post_max_size', '64M');
@ini_set('max_execution_time', '300');

Method 4: Contact Your Host

If none of these work, your host has hard limits. Ask them to increase upload limits or switch to a host with reasonable limits (64MB minimum).

6. PHP Memory Limit Exhausted

Symptoms: “Fatal error: Allowed memory size of X bytes exhausted” in error logs or white screen.

Common Causes: Memory-hungry plugins, large images, inefficient theme code, or insufficient PHP memory allocation.

How to Fix:

Step 1: Increase WordPress Memory Limit

Edit wp-config.php and add:

define('WP_MEMORY_LIMIT', '256M');
define('WP_MAX_MEMORY_LIMIT', '512M');

Step 2: Edit php.ini

memory_limit = 256M

Step 3: Identify Memory Hogs

Install Query Monitor plugin to identify which plugins or themes are consuming excessive memory.

Step 4: Optimize Images

Large unoptimized images eat memory. Use image optimization to compress uploads.

💡 When to Upgrade Hosting

If you constantly hit memory limits even after increasing to 256MB, you’ve outgrown shared hosting. Consider managed WordPress hosting with dedicated resources.

7. Failed Auto-Update

Symptoms: “Update failed” or site stuck in maintenance mode showing “Briefly unavailable for scheduled maintenance. Check back in a minute.”

Common Causes: Update interrupted, insufficient file permissions, or server timeout during update.

How to Fix:

Step 1: Delete .maintenance File

Via SFTP, look for a file named .maintenance in your WordPress root directory and delete it. This immediately takes the site out of maintenance mode.

Step 2: Manually Update WordPress

  1. Download the latest WordPress from wordpress.org
  2. Extract and upload wordpress/ folder contents via SFTP (excluding wp-content and wp-config.php)
  3. Visit yoursite.com/wp-admin/ to complete the update

Step 3: Fix File Permissions

WordPress needs write access to update itself. Set correct permissions (755 for directories, 644 for files).

8. Locked Out of WordPress Admin

Symptoms: Forgot admin password, security plugin locked you out, or admin URL changed by plugin.

Common Causes: Lost password, security plugin lockout, compromised account.

How to Fix:

Method 1: Reset Password via Email

Click “Lost your password?” on login screen. Enter your email and follow reset instructions.

Method 2: Reset Password via phpMyAdmin

  1. Access phpMyAdmin from your hosting control panel
  2. Select your WordPress database
  3. Click wp_users table
  4. Find your user and click Edit
  5. Change user_pass to your new password, select MD5 from Function dropdown
  6. Save changes

Method 3: Create New Admin via phpMyAdmin

Run this SQL query in phpMyAdmin (replace values):

INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`)
VALUES ('newadmin', MD5('password'), 'firstname lastname', 'email@example.com', '0');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (SELECT MAX(ID) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');

INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (SELECT MAX(ID) FROM wp_users), 'wp_user_level', '10');

Method 4: Disable Security Plugin

If a security plugin locked you out, rename its folder in /wp-content/plugins/ via SFTP to deactivate it.

9. Mixed Content Warnings (HTTP/HTTPS)

Symptoms: Browser shows “Not Secure” warning despite having SSL. Images or scripts don’t load. Console shows “Mixed Content” errors.

Common Causes: Site moved to HTTPS but old HTTP URLs remain in database or theme files.

How to Fix:

Step 1: Update WordPress Address

In WordPress Admin > Settings > General, ensure both “WordPress Address” and “Site Address” use https://

Step 2: Search and Replace Database URLs

Use Better Search Replace plugin:

  1. Install Better Search Replace plugin
  2. Go to Tools > Better Search Replace
  3. Search for: http://yoursite.com
  4. Replace with: https://yoursite.com
  5. Select all tables
  6. Check “Run as dry run” first to preview changes
  7. Run without dry run to apply changes

Step 3: Update Hardcoded URLs in Theme

Check theme files for hardcoded http:// URLs and update to https:// or use relative URLs (//yoursite.com/image.jpg)

Step 4: Force HTTPS Redirects

Add to .htaccess:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

10. Connection Timed Out

Symptoms: Site takes forever to load then shows “Connection timed out” or “Gateway timeout” error.

Common Causes: Resource-intensive plugin, PHP timeout too low, server overload, or poorly coded theme.

How to Fix:

Step 1: Increase PHP Timeout Values

Add to .htaccess:

php_value max_execution_time 300
php_value max_input_time 300

Step 2: Deactivate Plugins

Rename /wp-content/plugins/ folder via SFTP. If the site loads, reactivate plugins one by one to find the culprit.

Step 3: Check Server Resources

Access your hosting control panel and check CPU/memory usage. If you’re hitting limits, upgrade your hosting plan.

Step 4: Optimize Database

Use WP-Optimize plugin to clean and optimize your database, removing post revisions and spam comments.

11. Syntax Error in Functions.php

Symptoms: “Parse error: syntax error, unexpected…” or “Fatal error…” referencing functions.php. Site completely broken.

Common Causes: Code snippet added to functions.php contains typo, missing bracket, or extra character.

How to Fix:

Step 1: Access Functions.php via SFTP

Error message will reference line number. Open /wp-content/themes/your-theme/functions.php in a code editor.

Step 2: Find the Error

Go to the line number mentioned in the error. Common issues:

  • Missing semicolon at end of line
  • Missing closing bracket ) or }
  • Extra closing bracket
  • Missing opening PHP tag <?php
  • Text outside PHP tags

Step 3: Fix or Remove Code

Either fix the syntax error or completely remove the code snippet you just added.

Step 4: Use Child Theme

Never edit parent theme functions.php directly. Use a child theme so updates don’t overwrite your changes.

⚠️ Prevention

Always make a backup before editing functions.php. Better yet, use a code snippets plugin like Code Snippets or WPCode to safely add custom code with syntax validation.

12. Too Many Redirects

Symptoms: “ERR_TOO_MANY_REDIRECTS” or “The page isn’t redirecting properly” error in browser.

Common Causes: Incorrect URL settings, plugin redirect conflicts, or .htaccess redirect loops.

How to Fix:

Step 1: Clear Browser and Plugin Cache

Clear your browser cache and deactivate all caching plugins temporarily.

Step 2: Check WordPress URL Settings

Add to wp-config.php to force correct URLs:

define('WP_HOME','https://yoursite.com');
define('WP_SITEURL','https://yoursite.com');

Step 3: Check .htaccess for Redirect Loops

Via SFTP, rename .htaccess to .htaccess-old to disable it. If error goes away, you have conflicting redirect rules in .htaccess.

Step 4: Disable Redirect Plugins

Plugins like Redirection or Simple 301 Redirects can create loops. Deactivate redirect plugins via SFTP to test.

Step 5: Check SSL/HTTPS Settings

If you recently added SSL, ensure your site is properly configured for HTTPS. Use Really Simple SSL plugin to fix SSL issues automatically.

Conclusion: WordPress Error Prevention

While knowing how to fix WordPress errors is valuable, preventing them is even better. Most errors can be avoided with proper maintenance and hosting:

WordPress Error Prevention Checklist

Automatic Backups Before Every Update
Never update without a backup. Managed hosting includes automatic pre-update backups with one-click restoration.

Test Updates in Staging Environment
Test plugin and theme updates in staging before applying to production. This catches conflicts before they break your live site.

Monitor Site Health and Uptime
Proactive monitoring alerts you to issues before customers notice. Many errors can be fixed automatically with proper monitoring.

Use Quality Hosting with Expert Support
Budget hosting means solving errors yourself. Managed WordPress hosting includes expert support that fixes issues in minutes, not hours.

Keep Everything Updated (Safely)
Outdated WordPress, plugins, and themes cause security vulnerabilities and compatibility errors. Update regularly but carefully.

Most WordPress errors have simple solutions once you understand the underlying cause. When errors do occur, systematic troubleshooting with backups as your safety net gets you back online quickly.

However, if you find yourself constantly fixing WordPress errors rather than focusing on your business, it may be time to consider managed WordPress hosting where experts handle maintenance, updates, and troubleshooting for you.

HA

About Host Anchor

Host Anchor provides premium managed WordPress hosting and care plans . Safe WordPress updates with automatic restore points, personalized owner support, and proactive monitoring keep your site secure and worry-free. Direct owner support—my business number rings my cell phone, so emergencies get personal attention fast. Learn more →

Stop Fighting WordPress Errors

Host Anchor’s managed WordPress hosting includes proactive monitoring, automatic safe updates, expert troubleshooting, and backups that ensure you’re never more than a click away from recovery.

View Plans & Pricing
Get Free Consultation

 photo
Written by Founder & CEO, Host Anchor

How Does Your Website Score?

Free instant report on performance, security, SEO & health.

Takes ~30 seconds. No sign-up required.