> For the complete documentation index, see [llms.txt](https://learn.sitecove.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.sitecove.com/how-to-guides/web-hosting/troubleshooting-and-error-fixes/common-wordpress-errors-and-how-to-fix-them.md).

# Common WordPress Errors & How to Fix Them

#### Introduction

WordPress is a powerful and widely used content management system, but like any software, it can sometimes run into errors. These issues can be frustrating, especially if they disrupt your website’s functionality. This guide covers some of the most common WordPress errors and how to troubleshoot and fix them.

***

#### 1. White Screen of Death (WSOD)

#### Cause

* Incompatible themes or plugins
* Exhausted memory limit
* Syntax errors in code

#### Fix

* **Disable Plugins**: Access your WordPress files via FTP, navigate to `wp-content/plugins`, and rename the plugins folder to deactivate them.
* **Switch to a Default Theme**: Rename your active theme folder and WordPress will revert to a default theme.
* **Increase PHP Memory Limit**: Add this line to your `wp-config.php` file: `define('WP_MEMORY_LIMIT', '256M');`

***

#### 2. 500 Internal Server Error

#### Cause

* Corrupted `.htaccess` file
* Plugin or theme conflict
* PHP memory limit exceeded

#### Fix

* **Check `.htaccess` File**: Rename `.htaccess` to `.htaccess_old` and see if the site works.
* **Increase Memory Limit**: As mentioned above, increase PHP memory.
* **Re-upload Core Files**: Replace WordPress core files via FTP, excluding `wp-content`.

***

#### 3. Error Establishing a Database Connection

#### Cause

* Incorrect database credentials
* Corrupted database
* Server issues

#### Fix

* **Verify `wp-config.php` Settings**: Ensure database name, username, password, and host are correct.
* **Repair Database**: Add `define('WP_ALLOW_REPAIR', true);` to `wp-config.php` and visit `/wp-admin/maint/repair.php`.
* **Check Hosting Status**: Confirm your database server isn’t down.

***

#### 4. 404 Page Not Found

#### Cause

* Broken permalinks
* Deleted or missing content

#### Fix

* **Reset Permalinks**: Go to **Settings > Permalinks** and click **Save Changes**.
* **Check URLs**: Ensure the correct URL structure for pages and posts.

***

#### 5. Stuck in Maintenance Mode

#### Cause

* Interrupted updates

#### Fix

* **Delete `.maintenance` File**: Access your site via FTP and remove the `.maintenance` file from the root directory.

***

#### 6. WordPress Not Sending Emails

#### Cause

* Server misconfiguration
* Spam filters

#### Fix

* **Use SMTP Plugin**: Install and configure an SMTP plugin like **WP Mail SMTP**.
* **Check Email Settings**: Ensure the “From” address matches your domain.

***

#### Conclusion

Understanding and fixing common WordPress errors ensures your site remains functional and user-friendly. With the right approach, most issues can be resolved quickly, keeping your website running smoothly.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learn.sitecove.com/how-to-guides/web-hosting/troubleshooting-and-error-fixes/common-wordpress-errors-and-how-to-fix-them.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
