WPLake > Blog > 8 Common WordPress Errors and How to Fix Them
  • Deutsch
  • Español
  • Français
  • Italiano

8 Common WordPress Errors and How to Fix Them

Time to read: 4 mins

-

Updated 17.08.23

-

General Tips and Tricks
With every WordPress site development there are often common errors and other challenges, learn more about it and how to fix them.
Use debug mode to see WP errors

Table of Contents

1. Internal Server Error

#link copied

A generic server-side error message that often occurs due to incompatible plugins, syntax errors, white-screen-of-death, even incorrect file permissions, or corrupted .htaccess files.

The server would respond with a 500 Internal Server Error in this case.

Parse or Syntax Error

#link copied

This error is usually caused by a mistake in the code, such as a missing or misplaced character, which prevents WordPress from parsing the PHP correctly.

To fix a Parse or Syntax Error in WordPress, carefully review the code you recently modified or added. Look for missing or misplaced characters, unclosed parentheses, or incorrect syntax. Correct the error, save the file, and refresh the website to see if the error is resolved.

White Screen of Death (WSOD)

#link copied

When the website displays a blank white screen, indicating a PHP error or memory exhaustion issue, often caused by incompatible themes or plugins.

To fix the White Screen of Death in WordPress, deactivate recently installed or updated plugins or themes by accessing the website's file system via FTP or a hosting file manager. Rename the plugin or theme folders to disable them and check if the website loads properly.

File Permissions

#link copied

Here is a list of common directories in a WordPress installation along with recommended permissions:

  • wp-admin/ - Permissions: 755 (Owner: Read, Write, Execute; Group: Read, Execute; Public: Read, Execute)
  • wp-includes/ - Permissions: 755
  • wp-content/ - Permissions: 755
    • wp-content/themes/ - Permissions: 755
    • wp-content/plugins/ - Permissions: 755
    • wp-content/uploads/ - Permissions: 755 (or 775 if you need to allow write access to web server)
  • wp-config.php - Permissions: 600 (Owner: Read, Write; Group: None; Public: None)
  • .htaccess - Permissions: 644 (Owner: Read, Write; Group: Read; Public: Read)
  • index.php - Permissions: 644

Note: Permissions are represented in octal notation. The numbers indicate the access level for Owner, Group, and Public, respectively.

It's important to understand that different server configurations may require slightly different permissions. The above permissions are generally considered secure and provide the necessary access for WordPress to function properly while maintaining security. Always consult your hosting provider or system administrator for specific permission requirements based on your server setup.

So if you have different permissions for your folders and/or files then it’s time to update them.

Corrupted .htaccess file can usually be resolved by connecting to your server FTP and in your WordPress root directory, delete the .htaccess file. Go to your WordPress admin backend, visit Reading -> then Save. This will generate a new .htaccess file.

It's worth noting that there is a built in Health Check tool within WordPress, See Tools -> Site Health, this tool helps you identify less common issues, and also helps identify which folder permissions are incorrect among many other things.

wordpress tools site health
The Site Health tool within WordPress helps you identify issues.

2. Error Establishing a Database Connection

#link copied

This error occurs when WordPress cannot connect to the database due to incorrect database credentials, corrupted files, or database server issues, which is pretty common when migrating WordPress.

To fix the "Error Establishing a Database Connection" in WordPress, check your database credentials in the wp-config.php file, ensuring they are correct. Also, verify that your database server is running and accessible.

Note: Server set to ‘localhost’ is often fine, but some web hosting requires a specific address.

3. 404 Page Not Found

#link copied

When a requested page or resource is not found, typically caused by broken links, incorrect permalinks, or misconfigured server settings.

To fix a 404 Page Not Found error in WordPress, check for broken links or incorrect permalink settings. Update permalinks by going to Settings > Permalinks and saving the changes. Additionally, check for any server misconfigurations or conflicting plugins.

4. Maintenance Mode Stuck

#link copied

WordPress may display a maintenance mode message when updates are being performed, but sometimes it can get stuck, preventing normal website access. This is quite a common WordPress error.

To fix WordPress stuck in Maintenance Mode, access your website's root directory using FTP or a file manager, and delete the .maintenance file. This will manually remove the maintenance mode and restore normal website access.

5. Missing Stylesheet Error

#link copied

Occurs when trying to install or activate a theme by uploading the wrong file or an incomplete theme package that lacks the necessary stylesheet.

To fix the Missing Stylesheet Error in WordPress, ensure you are uploading the correct file, and to the correct directory. So, upload the complete theme ZIP file and ensure it contains the necessary stylesheet (style.css) within it.

If you purchased a pro theme, and you've already re-uploaded the css file, then it's best to reach out to the theme support.

6. Mixed Content Error

#link copied

When a website is not fully secured with HTTPS, mixed content errors arise from loading insecure resources (e.g. images or scripts) on a secure page. You can see this in your browser on the left of the URL bar, a open lock is insecure, a lock is when it's a secured page.

To fix a Mixed Content Error in WordPress, ensure all resources (images, scripts, etc.) are loaded securely via HTTPS. Update all internal links to use HTTPS, enable SSL/TLS on your site, and use plugins or manual methods to fix any external content or insecure URLs.

Pro Tip: Check the 'Console' tab in your browser inspect tool, to confirm there aren't issues with image url's.

Messages help get you across the road
Errors are often easy to resolve with the right approach.

7. Memory Limit Exhausted

#link copied

This error occurs when WordPress exceeds the allocated PHP memory limit, often due to resource-intensive plugins or inefficient coding.

To fix the "Memory Limit Exhausted" issue in WordPress, you can increase the memory limit by editing the wp-config.php file. Add the following line before the "/* That's all, stop editing! Happy blogging. */" line:

define('WP_MEMORY_LIMIT', '256M');

Replace '256M' with the desired memory limit (e.g. '512M' for 512 megabytes). Save the file and check if the error is resolved. If the issue persists, contact your hosting provider to increase the PHP memory limit for your website. Note: If your provider has a limit set on your account, and that limit is less than what you've defined, then it will max out at their limit, i.e. disregarding your setting.

8. HTTP Error Uploading Images

#link copied

When uploading images to WordPress, this error indicates a problem with file permissions, image size, or server configuration.

To fix the error when uploading images in WordPress, try reducing image size, disabling conflicting plugins or themes, increasing PHP memory limit, checking file permissions, or disabling mod_security in .htaccess file if applicable.

To confirm file permissions refer to the list of WordPress files with their permissions above.

Final thoughts

#link copied

Resolving these common WordPress errors usually involves troubleshooting, debugging, and applying appropriate fixes such as checking configuration settings, deactivating problematic plugins or themes, or adjusting file permissions.

If you’re still struggling and just can’t seem to find the answer, then it’s probably a good idea to find a WordPress Expert and ask for help.

Don't be afraid to try these things yourself, that's how many of us learn new things.

Happy Troubleshooting.

About the Author
Baxter Jones

Working in the web industry for over 15 years gaining experience in design,user experience and web best practices. Has a keen eye for detail and enjoys having a process when working and creating. He thinks WordPress is the best thing since sliced bread and when he’s not behind his computer he’ll be in the garden.

Got it