WordPress powers a huge share of the web, but even the most reliable CMS throws up errors that can put you into panic mode. Here’s how to fix the most common ones.
The good news: whatever error you’re seeing has almost certainly been hit by thousands of other users before you, and has a known fix.
Before touching anything, make sure you have a current backup – a plugin like UpdraftPlus or Solid Backups (formerly BackupBuddy) will handle this automatically. If you’re not confident making changes to core files, your hosting provider’s support team can usually resolve most of these safely.
1. Syntax error
Happens when you’ve added a code snippet with a typo or missing character. You’ll see something like:
Parse error - syntax error, unexpected $end in /public_html/site1/wp-content/themes/my-theme/functions.php on line 278
The message tells you the exact file and line number to check. Almost always it’s a missing bracket, semicolon or quote mark – open the file via FTP or your host’s file manager, check that line, and fix the syntax.
2. Internal server error (500 error)
One of the most common and least helpful errors, since it doesn’t tell you what’s wrong. Usual culprits are a corrupted .htaccess file, a plugin conflict, or exhausted PHP memory. Try renaming .htaccess temporarily, deactivating plugins one by one via FTP, and increasing your PHP memory limit through your hosting control panel.
3. Error establishing a database connection
Your site can’t reach its database – usually because of incorrect credentials in wp-config.php, an unresponsive database server, or (less often) a corrupted database. Check your database host, username and password in wp-config.php first, and contact your host if the credentials look correct but the error persists.
4. White screen of death
A blank white screen with no error message at all. Most commonly caused by a plugin or theme exhausting your PHP memory limit. Increase the memory limit in wp-config.php, or deactivate plugins via FTP one at a time to isolate the cause.
5. Posts returning a 404 error
Usually a permalink issue. Go to Settings > Permalinks in your WordPress dashboard and simply click Save (without changing anything) – this regenerates your rewrite rules and fixes the vast majority of cases.
6. Memory exhausted error
Looks like this:
Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2348617 bytes) in /home/username/public_html/site1/wp-includes/plugin.php on line xxx
A plugin or script has hit your PHP memory limit. Increase it by adding define('WP_MEMORY_LIMIT', '256M'); to your wp-config.php file, or ask your host to raise the server-level limit.
7. Locked out of wp-admin
If you’ve forgotten your password and can’t access the recovery email, you can reset it directly via phpMyAdmin in your hosting control panel, or ask your host to do it. If you suspect the site’s been compromised rather than just a forgotten password, change all passwords immediately and run a malware scan.
8. Login page keeps redirecting back to itself
Almost always caused by incorrect Site URL or Home URL values. Check Settings > General in wp-admin, or if you can’t get in, update the siteurl and home values directly in the wp_options database table via phpMyAdmin.
9. Broken images or failed uploads
Usually a file or directory permissions issue. Your wp-content/uploads folder generally needs permissions of 755 for folders and 644 for files – your host’s file manager or an FTP client will let you check and correct these.
There’s a lot that can go wrong with a website, but the reassuring part is that almost every WordPress error has a known, well-documented fix. If you’d rather not troubleshoot it yourself, get in touch with Web Marketing Angels and we’ll sort it for you.