So, you tried logging into your WordPress site and boom — you met the dreaded message: “There has been a critical error on this website.” Yikes! Even worse, you can’t get into the dashboard. Don’t worry. Take a deep breath and grab a coffee. We’ve got your back.
This guide will help you fix that critical error using something called FTP or SSH. No dashboard? No problem!
💥 What’s a WordPress Critical Error Anyway?
It’s WordPress’s way of saying, “Something’s very wrong.” This could be due to:
- A faulty plugin
- A broken theme
- A missing or misconfigured file
- A PHP error
When WordPress crashes like this, it usually locks you out of the admin area. That’s why we need to dive into the files directly using FTP or SSH access.
🛠️ Tools You’ll Need
Before we start, here’s what you’ll need:
- FTP client (like FileZilla) or SSH access
- Your website’s FTP/SSH login credentials (from your hosting provider)
- A little courage — you got this!
Step 1: Connect to Your Website
Let’s open the gate first. Choose between the two roads: FTP or SSH.
Path 1: Using FTP (Fun Transfer Party 🎉)
- Open your FTP client.
- Enter your FTP host, username, and password.
- Click “Connect.”
Once you’re connected, you’ll see your website files. Usually, they are under a folder like public_html.
Path 2: Using SSH (Super Safe Hacker-style 💻)
- Open Terminal (Mac/Linux) or an SSH client like PuTTY (Windows).
- Use this command:
ssh username@yourdomain.com - Enter your password when asked.
Now you’re in the server like a true developer ninja.
Step 2: Deactivate Problematic Plugins
Most critical errors are caused by bad plugins. Let’s try turning them off to see if that fixes the site.
- Go to the wp-content folder inside your WordPress files.
- Find the plugins folder.
- Rename the folder to something like plugins-disabled.
This disables all plugins at once. Try checking your website now. Still broken? Try this instead:
- Rename plugins back to what it was (so it’s active again).
- Open the plugins folder and rename individual plugin folders one by one.
- After each rename, check your website. When the site comes back, bingo! You’ve found the bad plugin.
Step 3: Switch to a Default Theme
If your site didn’t come back after disabling all plugins, the theme might be the villain.
- Still in wp-content? Go to the themes folder.
- Rename your active theme’s folder to something like mytheme-off.
- This tells WordPress to fall back to a default theme like twentytwentyfour (if it’s installed).
If no default theme is there, download one from WordPress.org, unzip it, and upload it into the themes folder via FTP or SSH.
Now refresh your site. Does it work? Woohoo! That ugly error is gone!
Step 4: Enable Debug Mode
Still stuck? Let’s turn on detective mode.
- In your site’s root directory, find the file called wp-config.php.
- Open it for editing.
- Look for this line:
define( 'WP_DEBUG', false ); - Change it to:
define( 'WP_DEBUG', true );define( 'WP_DEBUG_LOG', true );
This will create a file called debug.log in the wp-content folder. Open that log and see what’s going wrong.
Once done, turn debug mode off again by setting false.
Step 5: Check File Permissions
Sometimes WordPress can’t work because of wrong file permissions.
Here’s what the permissions should be:
- Files: 644
- Folders: 755
If you’re using SSH, here’s a handy command:
find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
That’ll fix permissions without breaking a sweat.
Step 6: Replace Corrupt Core Files
Sometimes a WordPress file just … falls apart. Let’s freshen things up:
- Download the latest WordPress zip from wordpress.org.
- Unzip it on your computer.
- Delete the wp-content folder — we don’t want to overwrite yours.
- Upload the remaining files via FTP and overwrite existing ones.
This refreshes your core WordPress files without touching your content.
Still No Luck? Try These Last Resorts
- Check the Error Logs: Your host might provide specific error logs that can help.
- Upgrade PHP: Your site may need a newer PHP version. Ask your host’s support to help.
- Restore from Backup: If you have a recent backup, restore it.
- Call for Help: Sometimes it’s okay to say, “I need a developer!”
Preventing This Nightmare in the Future
Let’s talk prevention — because doing this again would be a total bummer.
- Use a staging site before adding new plugins or themes.
- Keep regular backups with tools like UpdraftPlus or your host’s backup system.
- Set up automatic error alerts using tools like WP Debugging or email logs.
- Update regularly, but carefully!
Wrap Up 🎉
Fixing a WordPress critical error without dashboard access can feel like detective work. But with FTP or SSH, you can get dirty behind the scenes and bring your site back to life.
You disabled bad plugins, restored core files, and maybe even changed themes. You’re basically a web doctor now. Not bad, huh?
Now go reward yourself with a celebratory dance or donut. You deserve it!