Services Tools Pricing About Process Referral Program News Contact Get Started
How to Fix Common WordPress Errors: A Simple Troubleshooting Guide

How to Fix Common WordPress Errors: A Simple Troubleshooting Guide

Learn to fix the most common WordPress errors yourself. Step-by-step solutions for white screen of death, 500 errors, and more troubleshooting tips.

WordPress powers over 40% of websites worldwide. That's millions of sites relying on this platform every day. But even the most reliable systems occasionally throw up errors that can make your heart skip a beat.

Don't panic. Most WordPress errors look scarier than they actually are. In this guide, you'll learn how to diagnose and fix the most common WordPress problems yourself. We'll cover everything from the dreaded white screen to database connection errors.

Before You Start: Essential Safety Steps

Never attempt fixes on a live website without backing up first. One wrong move could make things worse.

Create a backup immediately:

  1. Use your hosting provider's backup tool (most offer one-click backups)
  2. Download your files via FTP if needed
  3. Export your database through phpMyAdmin

If you're on our WordPress hosting service, backups happen automatically. But it's still worth creating a fresh one before troubleshooting.

Enable WordPress debug mode to see detailed error messages:

  1. Open your site's wp-config.php file
  2. Find the line that says define('WP_DEBUG', false);
  3. Change it to define('WP_DEBUG', true);
  4. Add this line below it: define('WP_DEBUG_LOG', true);

This reveals the actual error messages instead of generic failures.

The White Screen of Death

The white screen is WordPress's most notorious error. Your site loads completely blank - no content, no error message, nothing.

What causes it:

  • Memory limit exceeded
  • Plugin conflicts
  • Theme issues
  • PHP errors

How to fix it:

Step 1: Increase Memory Limit

Add this line to your wp-config.php file:

ini_set('memory_limit', '256M');

Step 2: Deactivate All Plugins

  1. Access your site via FTP
  2. Navigate to /wp-content/plugins/
  3. Rename the plugins folder to plugins-off
  4. Check if your site loads

If it works, rename the folder back and reactivate plugins one by one to identify the culprit.

Step 3: Switch to Default Theme

  1. Go to /wp-content/themes/
  2. Rename your active theme folder
  3. WordPress will automatically switch to a default theme

If this fixes the issue, there's a problem with your theme files.

500 Internal Server Error

This generic error message means something went wrong, but the server can't specify what. Frustrating, but fixable.

Common causes:

  • Corrupt .htaccess file
  • Plugin conflicts
  • File permission issues
  • PHP memory limits

Step-by-step fix:

Step 1: Check .htaccess File

  1. Find the .htaccess file in your site's root directory
  2. Rename it to .htaccess-backup
  3. Try loading your site

If it works, the .htaccess file was corrupted. Go to Settings → Permalinks in WordPress admin and click "Save Changes" to regenerate it.

Step 2: Check File Permissions

Incorrect permissions can trigger 500 errors:

  • Folders should be 755 or 750
  • Files should be 644 or 640
  • Never set anything to 777 (major security risk)

Step 3: Increase PHP Memory

Add this to your .htaccess file:

php_value memory_limit 256M

Database Connection Error

"Error establishing a database connection" means WordPress can't communicate with your database.

Quick fixes:

Step 1: Check Database Credentials

Open wp-config.php and verify these details are correct:

  • DB_NAME
  • DB_USER
  • DB_PASSWORD
  • DB_HOST

Contact your hosting provider if you're unsure about these values.

Step 2: Test Database Connection

Create a new file called test-db.php in your root directory:

<?php
$connection = mysql_connect('DB_HOST', 'DB_USER', 'DB_PASSWORD');
if (!$connection) {
    die('Connection failed: ' . mysql_error());
}
echo 'Connected successfully';
?>

Replace the values with your actual database details. If this fails, contact your hosting provider.

WordPress Admin Issues

Can't access your WordPress admin area? Here's how to regain control.

Reset Admin Password via Database

  1. Access phpMyAdmin
  2. Find the wp_users table
  3. Locate your admin user
  4. Edit the user_pass field
  5. Enter a new password and select MD5 from the function dropdown

Create New Admin User via Functions.php

Add this code to your theme's functions.php file:

function add_emergency_admin(){

}
add_action('init','add_emergency_admin');

Visit your site once, then remove this code immediately for security.

Plugin and Theme Conflicts

Many WordPress errors stem from poorly coded plugins or themes.

Systematic Troubleshooting

  1. Deactivate all plugins
  2. Switch to a default theme
  3. Test if the error persists
  4. Reactivate plugins one by one
  5. Test after each activation

Keep notes of which plugin caused the issue. You can then contact the developer or find an alternative.

Memory Limit Errors

"Fatal error: Allowed memory size exhausted" means your site is trying to use more memory than allowed.

Permanent Solutions

  1. In wp-config.php: ini_set('memory_limit', '512M');
  2. In .htaccess: php_value memory_limit 512M
  3. Contact your host if you regularly need more than 256MB

Consider optimising your site if memory usage is consistently high. Remove unused plugins, optimise images, and use caching.

Common Issues and Quick Fixes

Site loading slowly after making changes? Clear all caching plugins and check if the issue persists.

Getting "Sorry, this file type is not permitted"? Add this to wp-config.php: define('ALLOW_UNFILTERED_UPLOADS', true); Remove it after uploading your file.

Stuck in maintenance mode? Delete the .maintenance file from your root directory.

Images not displaying properly? Check file permissions on your uploads folder (should be 755).

Prevention is Better Than Cure

Regular maintenance prevents most WordPress errors:

  • Keep WordPress, themes, and plugins updated
  • Run regular backups
  • Monitor your site's performance
  • Remove unused plugins and themes
  • Use quality hosting (like our WordPress hosting service)

Our website maintenance packages handle all this automatically, giving you peace of mind.

When to Call for Help

Some errors require professional intervention:

  • Malware infections
  • Server configuration issues
  • Complex database corruption
  • Persistent errors after trying these fixes

Don't spend days fighting a problem that could be fixed in hours by someone experienced.

What's Next?

Now you know how to handle the most common WordPress errors. But prevention is always better than cure.

Consider using our free website audit tool to identify potential issues before they become problems. It checks for security vulnerabilities, performance issues, and other factors that could lead to errors.

For comprehensive protection, explore our WordPress maintenance services. We handle updates, backups, security monitoring, and troubleshooting so you can focus on running your business instead of fixing website problems.

Remember: most WordPress errors look worse than they are. With the right approach and a bit of patience, you can solve most issues yourself. Keep this guide bookmarked for when you need it.

WC

Web Cardiff

Cardiff's WordPress specialists helping Welsh businesses grow online.

Need help with your website?

Get a fast, secure website that wins you business.

Get in touch