Skip to content

Common WordPress Errors and How to Fix Them

By ali 14 min read

Common WordPress errors and troubleshooting steps displayed on a computer screen

WordPress is flexible and easy to manage, but errors can still appear while you are updating plugins, changing themes, moving your website, or managing its settings. Sometimes a page stops loading. In other cases, you may see a database connection message, a 404 error, or a login page that keeps redirecting.

These problems can be frustrating, especially when your website is important to your business. The good news is that many common WordPress errors have identifiable causes and can be fixed with a few careful troubleshooting steps.

In this guide, you will learn how to identify and fix common WordPress errors, including:

  • White Screen of Death
  • Error establishing a database connection
  • 404 errors on posts and pages
  • Internal server errors
  • Login redirect loops
  • PHP memory limit errors
  • Mixed content warnings
  • Plugin and theme conflicts
  • Slow website performance
  • WordPress email delivery problems

Before making changes, take a full website backup if possible. If you are troubleshooting a business website, use a staging environment whenever you can. This helps prevent a temporary fix from causing another problem.

1. White Screen of Death (WSOD)

What is the White Screen of Death?

The White Screen of Death occurs when a WordPress page displays a blank screen instead of its normal content. In some cases, the entire website becomes unavailable. You may not see an error message because PHP errors are not being displayed publicly.

Common causes

  • A plugin is causing a PHP error or conflict.
  • The active theme contains an error.
  • A recent update is incompatible with your website.
  • Your hosting account has reached its PHP memory limit.

How to fix it

Step 1: Disable plugins. If you can access the WordPress dashboard, open Plugins and deactivate the plugins you recently installed or updated. If the dashboard is unavailable, connect to your website using FTP or your hosting file manager. Open wp-content and temporarily rename the plugins folder to plugins-old.

Renaming the folder disables the plugins. If the website loads again, rename the folder back to plugins and deactivate the plugins individually to identify the one causing the problem.

Step 2: Check the active theme. If disabling plugins does not help, switch to a default WordPress theme. You can do this from the dashboard if it is accessible. Otherwise, use your hosting tools or database carefully to activate an available default theme.

Step 3: Check the PHP error log. Your hosting control panel may provide an error log. Look for PHP errors that appeared when the blank page started. You can also enable WordPress debugging temporarily in wp-config.php:

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

After reproducing the issue, check wp-content/debug.log if your server allows the log to be written. Do not leave debugging enabled longer than necessary on a live website. Remove or disable these settings after troubleshooting, and never display detailed errors to visitors.

Step 4: Check the PHP memory limit. If the log reports a memory exhaustion error, see the memory limit section below. You may need your hosting provider to increase the available PHP memory.

2. Error Establishing a Database Connection

What does this error mean?

This message appears when WordPress cannot connect to the database that stores your posts, pages, users, settings, and other website information. Your website may stop loading completely.

Common causes

  • Incorrect database name, username, or password.
  • An incorrect database host value.
  • Database server downtime or connection problems.
  • Database corruption or a hosting resource issue.
  • Database details that were not updated after a website migration.

How to fix it

Step 1: Check your database settings. Open wp-config.php in your WordPress root directory. Check that these values match the database details provided by your hosting company:

define( 'DB_NAME', 'your_database_name' );
define( 'DB_USER', 'your_database_user' );
define( 'DB_PASSWORD', 'your_database_password' );
define( 'DB_HOST', 'localhost' );

Your database host is not always localhost. Use the exact host value supplied by your hosting provider. Do not share your database password publicly or paste it into support messages that are not secure.

Step 2: Check database availability. Open your hosting control panel and check whether the database server is running. If you recently migrated your website, confirm that the database was imported and that the database user has the required permissions.

Step 3: Contact your hosting provider. If the credentials are correct but WordPress still cannot connect, ask your host to check database server availability, connection limits, and database errors.

Step 4: Consider database repair. WordPress includes a database repair tool, but it must be enabled first. Add this temporary line to wp-config.php:

define('WP_ALLOW_REPAIR', true);

Then visit https://yourdomain.com/wp-admin/maint/repair.php and follow the available repair options. This page does not require a normal WordPress login, so remove the WP_ALLOW_REPAIR line immediately after the repair attempt. If the database is badly damaged, restore a verified backup or ask your hosting provider for help.

3. 404 Error on WordPress Pages or Posts

What happens?

A 404 Not Found error appears when you open a page or post that should exist on your website. The homepage may work correctly while individual post or page URLs fail.

Common causes

  • Incorrect or outdated permalink rewrite rules.
  • A missing or incorrect rewrite configuration in the server.
  • Changes to the permalink structure.
  • A deleted or changed page URL.
  • A plugin or custom code affecting URL routing.

How to fix it

Step 1: Refresh permalink settings. Log in to WordPress and go to Settings → Permalinks. You do not need to change the current structure. Click Save Changes to refresh the rewrite rules.

Step 2: Check the server rewrite configuration. On Apache hosting, WordPress commonly uses an .htaccess file for permalink rules. Make a backup before editing it. If the file is missing or damaged, WordPress may be unable to route post URLs correctly.

Step 3: Check the page URL. Confirm that the page or post has not been deleted, moved, or assigned a different slug. If the URL has changed, add a suitable redirect from the old URL to the new one.

If your website started showing 404 errors after moving WordPress or changing its URL structure, our guide on fixing WordPress post links and custom permalinks may also help.

4. Internal Server Error (500)

What causes a 500 error?

An Internal Server Error means the server could not complete a request. The message is generic, so it does not identify the exact cause by itself.

Possible causes include:

  • A damaged or incorrect .htaccess file.
  • A plugin or theme error.
  • A PHP fatal error.
  • Server configuration or resource limits.
  • Incorrect file or directory permissions.

How to fix it

Step 1: Check the server error log. Open the error log in your hosting control panel. It may show the PHP file or server rule responsible for the error.

Step 2: Test the .htaccess file. If your server uses Apache, connect through FTP or your hosting file manager and rename .htaccess to .htaccess-backup. Check whether the website loads. If it does, the original file may contain an invalid rule.

Once you can access the dashboard, visit Settings → Permalinks and click Save Changes to let WordPress generate its rewrite rules again. This step applies to supported Apache configurations. Other server types, such as Nginx, use different rewrite settings.

Step 3: Check plugins and themes. Temporarily disable plugins and test with a default theme if possible. If the error disappears, reactivate components one at a time to identify the cause.

Step 4: Ask your hosting provider to check server limits. If the error continues, the issue may be related to PHP configuration, permissions, or server resources.

5. WordPress Login Page Redirect Loop

What is a login redirect loop?

A login redirect loop happens when you enter your username and password, but WordPress sends you back to the login page instead of opening the dashboard.

Common causes

  • Browser cookies or cached login data.
  • A plugin that changes login or security behavior.
  • Incorrect WordPress Address or Site Address settings.
  • HTTP and HTTPS configuration mismatches.
  • Incorrect domain or URL settings after migration.

How to fix it

Step 1: Clear browser cookies. Clear cookies and cached data for your website, then try logging in again. You can also test in a private browser window.

Step 2: Check website URLs. If you can access the dashboard, go to Settings → General and confirm the WordPress Address and Site Address. Both should use the correct domain and protocol.

If you cannot access the dashboard, you can temporarily define the URLs in wp-config.php:

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

Replace the example domain with your actual website URL. Use the correct WordPress installation path if WordPress is installed in a subdirectory. Remove these temporary definitions after correcting the underlying settings if you want to manage the URLs from the dashboard.

Step 3: Check plugins. If the problem started after installing a security, cache, or login-related plugin, temporarily disable it and test again.

6. WordPress Memory Exhausted Error

What does the error mean?

You may see a message such as Allowed memory size exhausted. It means a PHP process used more memory than the limit allowed by your hosting environment.

Common causes

  • A plugin or theme uses too much memory.
  • A large import or background task requires additional resources.
  • Your hosting plan has a low PHP memory limit.
  • A PHP process is using memory inefficiently.

How to fix it

You can request a higher WordPress memory limit by adding this line to wp-config.php, before the line that says /* That's all, stop editing! Happy publishing. */:

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

This is a request to WordPress, not a way to override every server restriction. Your hosting provider may enforce a separate PHP memory limit. If the error continues, check the PHP error log and identify the plugin, theme, or task using excessive memory.

7. Mixed Content Error on an HTTPS Website

What is a mixed content error?

A mixed content warning can appear when your website loads over HTTPS but some resources, such as images, stylesheets, scripts, or fonts, are still requested over HTTP. Browsers may block insecure resources or show a warning.

Common causes

  • Old HTTP image URLs stored in the database.
  • Hard-coded HTTP links in theme or plugin files.
  • External scripts or fonts loaded without HTTPS.
  • Incorrect SSL or site URL configuration.

How to fix it

Step 1: Confirm your SSL certificate. Check that your hosting provider has installed a valid SSL certificate and that your website loads correctly over HTTPS.

Step 2: Check WordPress URLs. Go to Settings → General and confirm that the WordPress Address and Site Address use HTTPS.

Step 3: Find remaining HTTP resources. Open the affected page in your browser, open Developer Tools, and check the Console for mixed content warnings. The browser usually identifies the resource still loading over HTTP.

Step 4: Update old URLs carefully. If old image or content URLs are stored in the database, use a reliable search-and-replace method that supports serialized WordPress data. Take a database backup first. Avoid directly replacing text in the database with a basic SQL query because serialized data can be damaged.

Step 5: Check external resources. Update hard-coded links in your theme or plugin where appropriate. If an external service does not support HTTPS, find a secure alternative.

8. WordPress Plugin or Theme Conflict

How can you identify a conflict?

A plugin or theme conflict can cause layout problems, missing features, PHP errors, or a website that stops working after an update. The issue may appear immediately after installing a new plugin or updating an existing component.

How to find the cause

Step 1: Create a backup. Back up your website before changing plugins or themes.

Step 2: Deactivate plugins. Disable all plugins temporarily. If the issue disappears, a plugin is likely involved.

Step 3: Activate plugins individually. Turn them on one at a time and test the affected page after each activation. When the problem returns, check the last plugin you enabled.

Step 4: Test with a default theme. If the problem remains with plugins disabled, temporarily activate a default WordPress theme. If the issue disappears, investigate your original theme and its customizations.

Pro tip: Test WordPress, theme, and plugin updates on a staging website before applying them to a live business website. Also check the plugin’s compatibility information and keep a recent backup available.

9. Slow WordPress Website

Why is your WordPress website slow?

A slow website can make browsing frustrating and affect how visitors interact with your pages. The cause may be related to hosting, images, scripts, database queries, caching, or third-party services.

Common causes

  • Large images that have not been optimized.
  • Too many scripts or unnecessary plugin features.
  • Slow or overloaded hosting.
  • Missing page caching or browser caching.
  • External scripts and services that load slowly.
  • Heavy database queries or background tasks.

How to improve WordPress speed

  • Optimize images: Resize images to the dimensions required by your layout and use modern formats such as WebP where suitable.
  • Use caching: Configure a suitable page caching solution for your hosting environment.
  • Review plugins: Remove plugins and features that your website does not need. Check performance before assuming that plugin count alone is the problem.
  • Use a CDN: A content delivery network can serve static resources from locations closer to visitors.
  • Review hosting: If your server is consistently slow, ask your hosting provider to investigate or consider a more suitable plan.

You can test your website using Google PageSpeed Insights and GTmetrix. Review the recommendations and address the issues that have the greatest effect on your pages.

10. WordPress Not Sending Emails

What happens?

Your website may fail to send contact form notifications, password reset messages, order confirmations, or other emails. Sometimes WordPress reports that an email was sent, but it never reaches the recipient’s inbox.

Common causes

  • Your hosting server does not support reliable PHP mail delivery.
  • Email authentication records are missing or incorrect.
  • The SMTP settings are not configured correctly.
  • The recipient’s mail server rejects or filters the message.
  • A contact form or WooCommerce email setting is incorrect.

How to fix it

Step 1: Check your WordPress email settings. Confirm that the contact form, password reset, or WooCommerce notification is configured with the correct recipient address.

Step 2: Configure SMTP. Use a trusted SMTP service or email provider to send website emails through an authenticated mail server. A plugin such as WP Mail SMTP can help connect WordPress to an email service.

Step 3: Check email authentication. Follow your email provider’s instructions to configure the required SPF, DKIM, and, where applicable, DMARC records for your domain.

Step 4: Send a test email. Use your SMTP plugin’s test feature, then check the recipient inbox, spam folder, and mail logs for delivery errors.

If you run a WooCommerce store, test order emails as well as contact form notifications. A successful test from one feature does not always confirm that every website email is configured correctly.

How to Prevent Common WordPress Errors

Fixing errors is important, but regular maintenance can reduce the chances of encountering the same problems again. Follow these practices:

  • Keep WordPress updated: Install supported WordPress security and maintenance updates.
  • Update plugins and themes carefully: Check compatibility and test important updates before applying them to your live website.
  • Take regular backups: Keep database and website files backed up, and make sure you know how to restore them.
  • Use reliable hosting: Choose hosting that meets your website’s PHP, database, storage, and traffic requirements.
  • Monitor website health: Review WordPress Site Health, server logs, and performance reports.
  • Use a staging website: Test major changes away from your live website.
  • Limit unnecessary plugins: Install plugins from trusted sources and remove those you no longer use.
  • Protect administrator access: Use strong passwords, appropriate user permissions, and suitable security measures.

If you are facing a different WordPress problem, our guide to fixing blog and feed issues after moving WordPress to the root directory covers another common migration-related problem.

Frequently Asked Questions

1. What is the most common WordPress error?

There is no single error that affects every website most often. Blank pages, database connection errors, 404 errors, and internal server errors are all common issues. The cause depends on your hosting setup, plugins, theme, and recent website changes.

2. Can I fix WordPress errors without coding?

Yes. Many issues can be investigated through the WordPress dashboard or hosting control panel. For example, you can refresh permalink settings, deactivate plugins, clear browser cookies, and check basic website settings. Some problems require access to files, database settings, or help from your hosting provider.

3. Why does my WordPress website break after an update?

An update can expose a compatibility problem between WordPress, a plugin, a theme, or the PHP version used by your server. Check the error log, test plugins individually, and review the component’s compatibility information.

4. How can I prevent WordPress errors?

Keep WordPress and its components updated, use trusted plugins and themes, maintain regular backups, monitor website health, and test major changes on a staging website before deploying them.

5. Should I use a staging website?

Yes. A staging website is especially useful for business websites, online stores, and sites with custom code. It lets you test updates and configuration changes without directly affecting visitors using the live website.

6. What should I do if I cannot identify the error?

Check the WordPress and server error logs, note when the problem started, and review any recent updates or configuration changes. If you cannot identify the cause, contact your hosting provider or a WordPress developer. Share relevant error messages, but never send passwords or private access credentials.

Final Thoughts

WordPress errors can interrupt your website, but most problems become easier to handle when you identify the cause before changing settings. Start with the error message, check recent updates, review the logs, and test one possible cause at a time.

Always back up your website before editing files, changing database settings, or disabling important components. For a live business website, use a staging environment whenever possible. These simple precautions can help you troubleshoot safely and get your WordPress website working again.