Fix broken WordPress

The WordPress CPR: Reviving Your Site from the Brink

Fix broken WordPress: 5 Quick Steps

When Your WordPress Site Goes Down

To Fix broken WordPress sites, follow these essential steps:

  1. Create a backup of your files and database immediately.
  2. Enable WP_DEBUG in wp-config.php to identify errors.
  3. Deactivate all plugins via FTP by renaming the plugins folder.
  4. Switch to a default theme to rule out theme conflicts.
  5. Check your .htaccess file and regenerate permalinks.
  6. Repair your database using WordPress’s built-in repair tool.
  7. Replace corrupted core files with a fresh WordPress download.

WordPress powers 43.1% of all websites, so when your site breaks, it can mean lost sales and frustrated customers. The good news is that most issues are predictable. Plugin conflicts, theme issues, and database errors are common culprits, but they are also fixable.

This guide provides a complete, systematic process for diagnosing and fixing a broken WordPress site, even if you can’t access your admin dashboard. I’m Kevin Gallagher, founder of wpOncall. With over fifteen years of experience restoring hundreds of broken sites, I’ve learned that a methodical approach is the key to success. This guide will walk you through that proven process to get your site back online quickly and safely.

Infographic: Top 5 Reasons Your WordPress Site Breaks

Infographic illustrating the top 5 reasons WordPress sites break: Plugin Conflicts, Theme Issues, Core File Corruption, Database Errors, and Malware. - Fix broken WordPress

Understanding why WordPress sites break is the first step toward a quick recovery. These five issues are the most common culprits we see.

  1. Plugin Conflicts: This is the number one cause of WordPress failures. Conflicts arise when plugins are poorly coded, clash with each other, or are incompatible with your theme or WordPress core. A simple update can trigger a conflict that takes your entire site down.

  2. Theme Issues: Your theme controls your site’s appearance and functionality. An outdated theme, poorly written custom code, or conflicts with the latest WordPress version can cause errors, visual glitches, or a total site crash.

  3. Core File Corruption: The essential files that run WordPress can become corrupted. This often happens during a failed update when the server connection drops or runs out of disk space. Malicious actors can also deliberately corrupt these files to gain access.

  4. Database Errors: Your database stores all your content and settings. If it gets corrupted or if the connection credentials in your wp-config.php file are incorrect, your site will fail to load, often showing an “Error Establishing a Database Connection” message.

  5. Malware Infections: Hackers exploit vulnerabilities in outdated plugins, themes, or weak passwords to inject malicious code. This can lead to spam redirects, data theft, or your site being blacklisted by search engines.

Knowing these common causes allows you to fix broken WordPress sites systematically. By checking each potential problem area, you can diagnose the issue efficiently and get your site back online faster.

First Aid: Initial Diagnosis and Safety Measures

When your site goes down, panic is the enemy of problem-solving. Before rushing to make changes, take a deep breath and follow these initial diagnostic and safety steps. This methodical approach prevents a fixable problem from becoming a catastrophe.

A first-aid kit next to a laptop displaying a WordPress error. - Fix broken WordPress

Is Your Site Down for Everyone or Just You?

First, confirm the problem isn’t on your end. Try accessing your site from a different browser or on your phone using mobile data. A corrupted browser cache or a local network issue can make a site appear broken when it’s not. For a definitive check, use a free online tool like Downforeveryoneorjustme.com to see if your site is accessible from other locations.

Before You Operate: Create an Emergency Backup

This is the single most important step. Before you edit a single file or deactivate a plugin, create a complete backup of your site as it is—even though it’s broken. This backup is your safety net, allowing you to restore your site if troubleshooting makes things worse.

A complete backup includes both your WordPress files (themes, plugins, uploads) and your database (posts, pages, settings). The most reliable way to create a backup when your admin area is down is through your hosting control panel.

  • In cPanel, use the “Backup” tool to generate a full site backup. The cPanel backup guide provides detailed instructions.
  • In Plesk, the backup manager is similarly straightforward. Refer to the Plesk backup guide for help.

Crucially, download your backup and store it offsite (on your computer or in cloud storage). A backup stored on the same server is useless if the server itself fails.

Reading the Vital Signs: Enable WP_DEBUG and Check Logs

With a backup secured, it’s time to find out what’s wrong. WordPress has a built-in debugging mode that reveals hidden error messages. To enable it, you’ll need to edit your wp-config.php file using an FTP client like FileZilla or your host’s file manager.

A code snippet showing how to enable WP_DEBUG in the <code>md5-be84d25fe2669227053e5b866629b112</code> file. - Fix broken WordPress

Find the line define('WP_DEBUG', false); and change false to true. For better diagnostics, use this configuration instead:

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

This code tells WordPress to log all errors to a debug.log file inside your /wp-content/ folder without displaying them to the public. Refresh your site and then check this log file. The error messages are often very specific, pointing to the exact plugin or theme file causing the problem. This information is vital to fix broken WordPress issues efficiently.

Remember to change WP_DEBUG back to false once you’ve resolved the issue.

How to Fix Broken WordPress: A Step-by-Step Troubleshooting Guide

With a backup in hand and diagnostics enabled, it’s time to fix the problem. This troubleshooting guide follows a systematic process, starting with the most common culprits to isolate the issue without guesswork.

Troubleshooting Plugin Conflicts (The #1 Suspect)

Plugin conflicts cause over half of all WordPress site failures. The fastest way to confirm a plugin issue is to deactivate all of them at once.

  • If you can access your admin area: Go to Plugins > Installed Plugins, select all, and choose “Deactivate” from the bulk actions menu.
  • If your admin area is inaccessible: You must use an FTP client like FileZilla. Connect to your server, steer to the wp-content directory, and rename the plugins folder to something like plugins_deactivated.

After deactivating all plugins, check your site. If it loads, you’ve confirmed a plugin is the cause. To find the specific culprit, rename the folder back to plugins. Now, from your WordPress admin dashboard, go to the Plugins page and activate them one by one, checking your site after each activation. When the site breaks again, the last plugin you activated is the one causing the problem.

Once identified, you can either keep the problematic plugin deactivated and find an alternative, or contact the plugin developer for support with the error message you found.

If plugins aren’t the issue, your theme is the next suspect. A poorly coded or outdated theme can easily break your site, especially after a WordPress core update.

To test this, switch to a default WordPress theme like Twenty Twenty-Four, which is guaranteed to be compatible.

  • If you can access your admin area: Go to Appearance > Themes and activate a default theme.
  • If your admin area is inaccessible: Use FTP to steer to wp-content/themes/. Rename the folder of your active theme (e.g., mytheme_old). WordPress will automatically fall back to a default theme.

If your site starts working after switching themes, the problem lies with your theme. Your options are to contact the theme developer for support, check for updates, or review any custom code you may have added to its functions.php file. If the theme is old or unsupported, it may be time to switch to a new one.

If your site is loading but internal links lead to “404 Not Found” errors, the issue is likely with your permalinks or the .htaccess file. This file acts as a traffic controller for your server.

  • The Easy Fix: If you can access your admin area, go to Settings > Permalinks and simply click “Save Changes.” You don’t need to change any settings; this action forces WordPress to regenerate a clean .htaccess file.
  • The Manual Fix: If you’re locked out, use FTP to find the .htaccess file in your site’s root directory. Rename it to .htaccess_old. Then, create a new, empty file named .htaccess and paste in the default WordPress code:
# 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

Save the file and upload it. This usually resolves all 404 errors and is a common step to Fix broken WordPress navigation issues.

Advanced Procedures: Repairing Core Files, Database, and Security Breaches

If the common troubleshooting steps don’t work, the problem may lie deeper within your site’s core files, database, or a potential security breach. These procedures are more technical but are often necessary for a full recovery.

A server rack or database icon, signifying advanced technical topics. - Fix broken WordPress

Repairing the Database

An “Error Establishing a Database Connection” message often points to database corruption or incorrect credentials. WordPress has a built-in repair tool for this.

  1. Enable the Repair Tool: Add the following line to your wp-config.php file via FTP: define('WP_ALLOW_REPAIR', true);
  2. Run the Repair: Steer to www.yourwebsite.com/wp-admin/maint/repair.php in your browser. You will see an option to “Repair and Optimize Database.” Choose this to fix corruption and improve performance.
  3. Disable the Tool: This is critical for security. After the repair is complete, immediately remove the line you added from wp-config.php.

If the error persists, double-check your database credentials (DBNAME, DBUSER, DBPASSWORD, and DBHOST) in wp-config.php. Contact your hosting provider to confirm they are correct.

Reinstalling WordPress Core Files Manually

Corrupted core files, often from a failed update, can cause strange errors. You can replace these files without affecting your content.

  1. Download WordPress: Get a fresh copy from the official WordPress.org download page.
  2. Extract and Prepare: Unzip the file on your computer. You will see wp-admin, wp-includes, and other root files.
  3. Connect via FTP: Use an FTP client like FileZilla to access your site’s root directory.
  4. Delete Old Core Folders: On your server, delete the existing wp-admin and wp-includes folders.
  5. Upload New Files: Upload the fresh wp-admin and wp-includes folders from your computer to the server. Then, upload all the individual files from the root of the new WordPress download, overwriting the old ones on the server.

Important: Do NOT delete or overwrite your wp-content folder or your wp-config.php file. These contain your unique content, themes, plugins, and database settings.

Scanning for and Removing Malware Infections

If you suspect your site has been hacked—due to slow performance, strange redirects, or spam content—you must act quickly. A malware infection can disguise itself as a technical problem.

  • Scan Your Site: Use a reputable online security scanner to check your site for known malware signatures and blacklist status. Search for “free website security scanner” to find several options.
  • Check for Signs: Look for unfamiliar admin users in WordPress, review posts for injected spam links, and check for malicious files in your theme and plugin folders.
  • Clean the Infection: The most reliable way to remove malware is to restore from a clean backup taken before the infection occurred. Manual removal is extremely difficult and best left to professionals, as a single missed file can allow the infection to return.
  • Harden Your Site: After cleaning, change all passwords (WordPress, FTP, hosting), update all plugins and themes, and install a reputable security plugin to monitor for future threats. This is a critical step to fix broken WordPress sites that have been compromised.

Common Error Messages and How to Solve Them

WordPress errors can seem cryptic, but they provide vital clues. Here’s a quick guide to the most common ones and how to fix them.

The White Screen of Death (WSoD)

Your site displays a blank white screen. This is usually a fatal PHP error or a memory issue.

  • Causes: Plugin/theme conflicts, or PHP memory limit exhaustion.
  • Solutions:
    1. Enable WP_DEBUG to reveal the specific error message.
    2. Increase the PHP memory limit by adding define('WP_MEMORY_LIMIT', '256M'); to your wp-config.php file.
    3. Deactivate all plugins and switch to a default theme via FTP, as described earlier.

Internal Server Error (500 Error)

This is a generic server error, meaning something went wrong but the server isn’t sure what.

  • Causes: A corrupt .htaccess file is the most common cause. It can also be caused by memory limits or plugin/theme issues.
  • Solutions:
    1. Rename your .htaccess file via FTP to .htaccess_old. If the site works, go to Settings > Permalinks and click “Save Changes” to generate a new one.
    2. If that fails, follow the same steps as for the WSoD: increase memory, deactivate plugins, and switch themes.

Locked Out of the Admin Area

You’re stuck in a login loop, the page refreshes, or your password doesn’t work.

  • Causes: Plugin conflicts (especially security or caching plugins), theme issues, or incorrect site URL settings.
  • Solutions:
    1. Reset Password via Database: If the email reset fails, you can use phpMyAdmin to manually change your password in the wp_users table. Find your user, edit the user_pass field, enter a new password, and select “MD5” from the function dropdown.
    2. Deactivate Plugins/Themes: A plugin or theme is often the culprit. Rename the plugins or active theme folder via FTP to regain access.
    3. Check Site URLs: Incorrect siteurl and home values in the wp_options table can cause redirect loops. Verify them in phpMyAdmin.

For more guidance, the official WordPress support forums are a valuable resource, such as this WordPress.org support thread on being locked out.

Frequently Asked Questions about Fixing WordPress

Over the years at wpOncall, we’ve answered thousands of questions from worried site owners. Here are the most common ones.

Can I fix a broken WordPress site without losing my content?

Yes, in almost all cases. Your content (posts, pages, images) is stored separately from the WordPress core files, plugins, and themes that are usually the cause of the problem. Your posts and settings are in the database, and your media uploads are in the wp-content folder. Our repair methods target the functional parts of WordPress while leaving your data untouched.

This is precisely why creating a backup before you start is non-negotiable. It’s your insurance policy that guarantees your content is safe, no matter what happens during the repair process.

Why does my WordPress site break after an update?

Updates are crucial for security, but they can expose underlying compatibility issues. A plugin or theme might not have been updated to work with the latest version of WordPress, causing a conflict. With thousands of developers creating products for WordPress, not all of them keep pace with core updates.

The problem often lies with outdated code in a plugin or theme that is no longer supported by the new WordPress version. The best way to prevent this is to test major updates on a staging site—a clone of your live site—before applying them. Many quality hosts offer one-click staging environments.

Broken links (which lead to “404 Not Found” errors) hurt user experience and can negatively impact your SEO rankings. Finding and fixing them is a key part of site maintenance.

  • Find Broken Links: Use a tool like Google Search Console to find 404 errors that Google’s crawlers have found on your site. There are also many free online broken link checkers available.
  • Fix Internal Links: Once you have a list, log in to your WordPress admin, find the post or page with the broken link, and either update the URL or remove the link.
  • Use Redirects: If you’ve moved or deleted pages, set up 301 redirects to guide users and search engines to the new location. A plugin like Redirection can help you manage this from your dashboard.

Regularly checking for broken links should be part of your ongoing maintenance routine to keep your site professional and user-friendly.

Conclusion: Prevention and Professional Peace of Mind

We’ve covered the entire process of reviving a broken WordPress site, from diagnosis to advanced repair. The core principles are simple: diagnose carefully, back up everything, troubleshoot methodically, and prioritize prevention.

A broken site feels like a crisis, but most issues are solvable with a calm, step-by-step approach. The best way to Fix broken WordPress issues is to prevent them from happening in the first place.

  • Regular Updates: Keep WordPress core, themes, and plugins updated.
  • Quality Hosting: A reliable host prevents many server-side issues.
  • Automated Backups: Ensure you have regular, offsite backups.
  • Strong Security: Use strong passwords and a security plugin.
  • Test on Staging: Test major changes on a staging site before going live.

However, not everyone has the time or technical comfort to handle these issues. Your expertise is running your business, not debugging PHP. When you need your site back online now, professional help is the most efficient choice.

At wpOncall, this is what we do every day. We specialize in WordPress support and security, providing the expertise and fast response times needed to resolve any issue quickly. Whether you’re in Santa Rosa, CA, or anywhere else, we’re ready to restore your site and your peace of mind.

Get expert WordPress support today.