WordPress errors can stop your site from loading, logging in, or sending email. This article lists the most common WordPress errors and gives you step-by-step fixes you can try yourself, starting with the simplest and safest methods before moving to more technical ones.
Error Establishing a Database Connection
This is the most feared WordPress error. It appears when WordPress cannot connect to your MySQL database, and it usually happens after a move, a plugin conflict, or a corrupted database. The fix is usually simple.
- Check your
wp-config.phpfile. Open it via FTP or your hosting file manager and verify the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST values. If you recently changed your hosting password, update it here. - Repair your database. Add
define('WP_ALLOW_REPAIR', true);to your wp-config.php file, then visityourdomain.com/wp-admin/maint/repair.php. Click “Repair Database� and then remove that line. - Contact your host. If the database server is down or the user lacks permissions, your host can fix it quickly.
If you see this error after moving to a new host, double-check the DB_HOST value – it is often localhost, but some hosts use a different server name.
The White Screen of Death (WSOD)
A completely white page with no error message is called the White Screen of Death. It usually means PHP has crashed, often due to a plugin or theme conflict or a memory limit issue.
- Increase the PHP memory limit. Edit
wp-config.phpand adddefine('WP_MEMORY_LIMIT', '256M');before the “That’s all� line. - Disable all plugins. Rename the
pluginsfolder inwp-contenttoplugins_oldvia FTP. If your site loads, rename it back and then deactivate plugins one by one via the admin panel. - Switch to a default theme. Rename your active theme’s folder in
wp-content/themes. WordPress will fall back to a default theme. - Enable WP_DEBUG. Add
define('WP_DEBUG', true);to wp-config.php to see the actual error message and identify the file.
404 Errors on All Pages (Permalink Issue)
If your homepage loads but every internal page returns a 404, your permalinks are broken. This is common after moving a site or updating the .htaccess file.
- Go to Settings → Permalinks in your admin dashboard.
- Click “Save Changes� without changing anything. This refreshes the rewrite rules.
- If that doesn’t work, check your
.htaccessfile. It should contain the standard WordPress rewrite rules. If it’s missing, create one with the default rules from the WordPress Codex. - If you use Nginx, you need to add the WordPress rewrite rules to your server configuration – ask your host for the correct snippet.
“Are You Sure You Want to Do This?� / 403 Forbidden
This error appears when you try to perform an action in the admin panel and WordPress rejects it. It is often caused by a security plugin, a corrupted .htaccess file, or file permission issues.
- Deactivate all security plugins (like Wordfence or Sucuri) via FTP by renaming the plugin folder.
- Check file permissions. WordPress files should be 644 and folders 755. If they are set to 666 or 777, change them back.
- If you are using a caching plugin, clear its cache and then deactivate it.
Internal Server Error (500)
A 500 error means the server encountered an unexpected condition. It is often caused by a PHP error, a corrupted .htaccess file, or a plugin conflict.
- Rename your
.htaccessfile to.htaccess_old. If the site loads, go to Settings → Permalinks and click “Save Changes� to regenerate it. - Increase the PHP memory limit (see WSOD section).
- Check the PHP error log in your hosting control panel. The log will point to the exact file and line.
- If you recently edited a theme’s functions.php file, revert it to the original.
Login Page Redirect Loop
You try to log in but the page keeps redirecting to the login page. This is usually caused by a plugin (especially caching or security) or incorrect site URL settings.
- Clear your browser cache and cookies.
- Deactivate all plugins via FTP (rename the plugins folder).
- Check your site URL settings. Edit
wp-config.phpand add these lines, replacing the URLs with your actual ones:define('WP_HOME','http://example.com');define('WP_SITEURL','http://example.com'); - If you use a caching plugin, purge all caches.
Cannot Send Email / Emails Going to Spam
WordPress uses the PHP mail() function by default, which is often blocked by hosts or flagged as spam. This is why many contact forms fail.
- Install an SMTP plugin (like WP Mail SMTP or Easy WP SMTP) and configure it with your email provider’s SMTP settings.
- If you use a transactional email service, enter its SMTP credentials in the plugin.
- Check that your domain’s SPF and DKIM records are set up – your email provider will give you the values to add to your DNS.
Frequently Asked Questions
Why do I get “Error establishing a database connection� after moving my site?
This is almost always because the database credentials in wp-config.php are outdated. The database name, user, and password often change when you move to a new host. Update them and also check the DB_HOST – some hosts use a specific server name instead of “localhost�.
How do I fix the white screen of death without losing my content?
Your content is safe – it’s in the database, not in the files. The white screen is a PHP error. Start by increasing the memory limit and enabling WP_DEBUG to see the error message. Then deactivate plugins and switch to a default theme via FTP. Your content will still be there once the site loads.
Why does my WordPress site show 404 on all pages except the homepage?
This is a permalink issue. Go to Settings → Permalinks and click “Save Changes�. If that doesn’t fix it, check that your .htaccess file exists and has the default WordPress rewrite rules. On Nginx servers, you need to add the rewrite rules to the server config.
How do I fix the “Are you sure you want to do this?� error?
This error is often caused by a security plugin or a corrupted session. Deactivate all security plugins via FTP, clear your browser cookies, and try again. Also check that your site URL in wp-config.php matches your actual domain.
Why is my WordPress site sending emails to spam?
WordPress uses PHP mail, which is often not authenticated. Use an SMTP plugin to send emails through a real email service. Also set up SPF and DKIM DNS records for your domain – these help email providers verify that the email is really from you.
Can I fix a 500 internal server error myself?
Yes, in most cases. First rename your .htaccess file, then increase the PHP memory limit. If that doesn’t help, check the PHP error log in your hosting control panel – it will tell you the exact file and line causing the problem. If it’s a plugin, deactivate it via FTP.
Related
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
More cards in this drawer
- DisplayPort vs HDMI: Which Cable Should You Use?
- Soundbar vs 2.1 Speaker System: Which Is Better?
- Survive Lava for Brainrot Tier List170 points
- MySQL Dump Import: Fix Common Errors
- Mouse Moving on Its Own? Causes & Fixes
- Slack Channels for Construction Projects: Setup Guide