# How to Increase WordPress Memory Limit

Increasing the memory limit in WordPress can help improve performance, especially for resource-intensive plugins and themes. Follow these steps to increase the memory limit:

#### Step 1: Log into cPanel

1. **Log into your cPanel** from within your Clouduxe client account.

#### Step 2: Access File Manager

1. Locate and click the **"File Manager"** menu in the Files section.
2. Click on the **`public_html`** folder.

#### Step 3: Edit wp-config.php

1. Search for the **`wp-config.php`** file, right-click on it, and select **"Edit."**

{% hint style="info" %}
The `wp-config.php` file is crucial for your WordPress installation, so be careful when editing it.
{% endhint %}

#### Step 4: Add Memory Limit Code

1. Add the following code right before the line that says: <mark style="color:blue;background-color:blue;">`// That's all, stop editing! Happy blogging.`</mark>

   ```php
   define( 'WP_MEMORY_LIMIT', '512M' );
   ```
2. You can enter any value where `512M` is stated, depending on your needs and server capabilities.

#### Alternative Method: Modify default-constants.php

If necessary, you can also change the memory limit in the `wp-includes` folder by editing the `default-constants.php` file. However, this method is less common.

#### Step 5: Confirm Changes

To confirm that your changes have taken effect, create a `phpinfo.php` file. Here’s how:

1. In the File Manager, create a new file named `info.php`.
2. Add the following code to the file:

   ```php
   <?php phpinfo(); ?>
   ```
3. Save the file and navigate to `yourdomain.com/info.php` in your browser.

### Conclusion

Increasing the WordPress memory limit can enhance your site's performance and stability. Always remember to back up your site before making changes to configuration files.

{% hint style="warning" %}
Setting an excessively high memory limit can lead to server issues. Always check your hosting provider's recommended limits.
{% endhint %}


---

# Agent Instructions: 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://docs.clouduxe.com/wordpress/how-to-increase-wordpress-memory-limit.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.
