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

8 Common WordPress Errors and How to Fix Them

Troubleshoot common WordPress errors: Internal Server, Database Connection, 404, Stucked Maintenance Mode, Mixed Content, and Memory Limit.
Use debug mode to see WP errors

Key Points at a Glance

  1. Internal Server Error: A generic server-side error, often caused by incompatible plugins or corrupted files.
  2. Error Establishing a Database Connection: Occurs when WordPress fails to connect to the database due to various reasons like incorrect credentials or server issues.
  3. 404 Page Not Found: Result of broken links or misconfigured server settings, leading to inaccessible resources.
  4. Maintenance Mode Stuck: WordPress gets stuck in maintenance mode during updates, hindering normal access.
  5. Missing Stylesheet Error: Arises from uploading incomplete theme packages or incorrect files, hindering theme activation.
  6. Mixed Content Error: Results from insecure resource loading on secure pages, often due to unsecured links or images.
  7. Memory Limit Exhausted: WordPress surpasses PHP memory limits due to resource-intensive plugins or inefficient code.
  8. HTTP Error Uploading Images: Indicates problems with file permissions, image size, or server configuration during image uploads in WordPress.

Table of Contents

1. Internal Server Error

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

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)

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

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

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

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

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

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

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

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

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

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.

Was this article helpful?

Totally useless

Slightly helpful

Very helpful

FAQ mode


Learning mode

  1. What causes the "Internal Server Error" in WordPress?

    The "Internal Server Error" can occur due to various reasons such as incompatible plugins, syntax errors, corrupted files, or incorrect file permissions.

  2. How can I fix a "White Screen of Death" in WordPress?

    To resolve the "White Screen of Death," you can deactivate recently installed or updated plugins or themes, check for PHP errors or memory exhaustion, and adjust file permissions.

  3. What should I do if I encounter an "Error Establishing a Database Connection"?

    If you encounter this error, you should check your database credentials in the wp-config.php file, ensure your database server is running, and verify database accessibility.

  4. How can I address the "404 Page Not Found" error in WordPress?

    To fix the "404 Page Not Found" error, you should check for broken links, update permalink settings if necessary, and investigate any server misconfigurations or conflicting plugins.

  5. What steps can I take to resolve the "Memory Limit Exhausted" issue in WordPress?

    You can increase the memory limit in the wp-config.php file, disable resource-intensive plugins, or contact your hosting provider to raise the PHP memory limit.

  6. Why do I encounter an "HTTP Error Uploading Images" in WordPress?

    The "HTTP Error Uploading Images" typically occurs due to issues with file permissions, image size, or server configuration during the image upload process.

  7. How can I fix a "Missing Stylesheet Error" when installing a WordPress theme?

    Ensure that you upload the correct theme file to the correct directory and that the theme package contains the necessary stylesheet (style.css).

  8. What can I do if my WordPress site gets stuck in maintenance mode?

    If your site gets stuck in maintenance mode, you can manually remove the .maintenance file from your website's root directory using FTP or a file manager.

Course navigation: WordPress Beginner

Content links (7)

About the Author

Baxter Jones

With over 15 years of experience in the web industry, I specialize in design, user experience, and web best practices. I have a keen eye for detail and thrive on following a structured process in my work. I’m passionate about WordPress, considering it the best innovation since sliced bread. When I’m not at my computer, you’ll find me enjoying time in the garden.


    Leave a comment

    Reply to 

    Please be considerate when leaving a comment.

    Not shown publicly

    Got it