Top 5 WordPress Errors and Their Solutions
WordPress powers around 40% of all websites, according to W3Techs. With that many sites, plugins and themes, errors are part of the job. Most of them have a quick fix once you know the cause.
This guide covers the seven errors we see most often on WordPress sites, with the fastest fix for each. For the bigger problems, we link to a full step-by-step guide.
Quick reference
| Error | What it means | Fastest fix |
|---|---|---|
| Error establishing a database connection | WordPress cannot reach its database | Check the database details in wp-config.php |
| White screen or “critical error” | A PHP error stopped the page | Use the recovery email, then disable plugins |
| Too many redirects | Your site loops between URLs | Check the site URLs and clear cookies |
| 404 on posts after a migration | Permalink rules are missing | Save your permalinks again |
| Maximum execution time exceeded | A script ran too long | Raise the time limit |
| “Not secure” warning | HTTPS is not set up correctly | Fix mixed content and the certificate |
| Forgotten admin password | You cannot log in or get the email | Reset it in phpMyAdmin |
Before you change anything, take a backup of your files and database. If you can, test fixes on a local copy of your site first.
1. Error establishing a database connection
This message means WordPress cannot talk to your database. Without the database, your site has no content to show.
Common causes: wrong database details, a database server that is down, a damaged database, or a hosting limit.
How to fix it:
- Open
wp-config.phpin your site’s root folder. - Check
DB_NAME,DB_USER,DB_PASSWORDandDB_HOST. They must match what your hosting panel shows. - Ask your host whether the database server is running.
- If the details are right, add
define( 'WP_ALLOW_REPAIR', true );towp-config.phpand openyourdomain.com/wp-admin/maint/repair.php. Run the repair, then remove the line.
See our full guide: WordPress database connection error explained.
2. White screen or “There has been a critical error”
A blank page or a short critical error message means PHP hit a fatal error. It is usually caused by a plugin, a theme or a memory limit.
Fastest fix: Look for the “Your Site is Experiencing a Technical Issue” email from WordPress. It has a recovery link that names the faulty plugin or theme. No email? Rename the plugins folder over FTP to switch off every plugin, then switch plugins back on one at a time.
For the full list of fixes, read how to fix the WordPress White Screen of Death. If memory is the cause, see how to increase the PHP memory limit.
3. Too many redirects (redirect loop)
Your browser shows “This page isn’t working. Too many redirects” (ERR_TOO_MANY_REDIRECTS). The site keeps sending visitors back and forth between URLs.
Common causes: different WordPress Address and Site Address settings, a bad HTTPS plugin setting, a faulty .htaccess file, or a CDN set to the wrong SSL mode.
Fastest fix: Clear your browser cookies and cache first. Then go to Settings > General and check that both URLs are identical and use the same https address. Turn off redirect or SSL plugins to test. Our guide explains every step: how to fix the WordPress redirect loop error.
4. Error 404 on posts after moving your website
You move your site to a new server. The homepage loads, but every post and page shows a 404 error.
This happens because the permalink rules did not come over with the move.
How to fix it:
- Log in to your dashboard and go to Settings > Permalinks.
- Do not change anything. Just click Save Changes.
- Reload a post. If it still fails, rename the
.htaccessfile to.htaccess_old, then save permalinks again to create a fresh one. - On Nginx servers there is no
.htaccessfile, so ask your host to check the rewrite rules.
Also check that your site URLs match the new domain. After a domain change, allow time for DNS propagation before you test.
5. Maximum execution time exceeded
You may see “Fatal error: Maximum execution time of 30 seconds exceeded.” WordPress ran a task, such as an import, a backup or a big plugin update, that took longer than the server allows. Many servers set the limit at 30 seconds by default, though some hosts use a different number.
How to fix it:
- Ask your host to raise
max_execution_time. This is the safest option. - If you can edit
php.ini, setmax_execution_time = 300. - Some hosts let you add this line to
wp-config.php:@ini_set( 'max_execution_time', '300' );
If one of these lines causes a new error, remove it and ask your host for help. Also check whether a plugin is running a heavy task. Fixing the plugin is better than raising the limit forever.
6. “Not secure” warning on your site
Browsers show “Not secure” when your site loads over plain HTTP or mixes secure and insecure content. Chrome replaced its padlock icon with a neutral icon in 2023, so you may not see a green padlock even on a healthy site.

How to fix it:
- Mixed content: Make sure images, scripts and stylesheets load over HTTPS. A plugin such as Really Simple SSL can update the links for you.
- Expired certificate: Check the expiry date. Most hosts renew free certificates automatically, so ask yours if it has stopped.
- Wrong install: Reinstall the certificate from your hosting panel, or ask your host to do it.
- Redirects: Send all HTTP traffic to HTTPS, and make sure both site URLs in Settings > General start with https.
If you use Cloudflare and see error 526, read how to fix the invalid SSL certificate error. To learn the basics, read our guides on SSL certificates and why your site has no green padlock.
7. Forgotten admin password
Usually you click Lost your password? and get an email. But some servers cannot send email, so the reset link never arrives.
How to reset it in phpMyAdmin:
- Log in to your hosting panel and open phpMyAdmin.
- Open your WordPress database and find the
wp_userstable. Your prefix may differ. - Click Edit next to your admin user.
- In the
user_passrow, choose MD5 in the Function column and type your new password in the Value column. - Click Go to save, then log in.
- Change the password again from your profile, so WordPress stores it with its current secure method.
If you use WP-CLI, you can run wp user update USERNAME --user_pass=NEWPASSWORD instead.
To stop this problem coming back, install an SMTP plugin so your site can send email reliably. Use a strong, unique password and review our guide to keeping your WordPress website secure.
Other errors you may meet
Internal Server Error (500): Often caused by a faulty .htaccess file. Rename it to .htaccess_old and reload. If that works, create a new one from Settings > Permalinks. If not, check plugins, memory and your host’s error log.
Stuck in maintenance mode: After an interrupted update, WordPress may show “Briefly unavailable for scheduled maintenance.” Use FTP to delete the hidden .maintenance file in your site’s root folder.
Headers already sent: Usually caused by extra spaces or output in a PHP file. See how to fix the headers already sent warning. For other website errors, see 5 common website errors and their solutions.
How to prevent WordPress errors
- Back up your site before every update.
- Update plugins one at a time and test the site each time.
- Remove plugins and themes you do not use. Our guide on why you need WordPress plugins helps you keep the list short.
- Use a caching setup that matches your host.
- Run a security plugin.
- Choose a host with daily backups and good support.
Summary
WordPress errors look alarming, but most have a simple cause and a quick fix. Start with the basics: read the error message, check your recovery email and turn off plugins one at a time. Always take a backup before you change any file or database setting. Keep your plugins updated, remove the ones you do not use, and test big changes on a copy of your site. If you get stuck, contact us and we will help you fix it.



