> ## Documentation Index
> Fetch the complete documentation index at: https://speedypage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Increase the WordPress memory limit

> How to raise the PHP memory limit for WordPress by editing wp-config.php in cPanel.

If you see "Allowed memory size exhausted" errors or your WordPress dashboard feels slow, you may need to increase the memory available to WordPress. This is separate from the PHP `memory_limit` setting. WordPress has its own cap defined in `wp-config.php`.

## Edit wp-config.php

<Steps>
  <Step title="Open File Manager">
    Log in to cPanel through your [client area](https://my.speedypage.com) or at `yourdomain.com/cpanel`. Go to **Files** and click **File Manager**.
  </Step>

  <Step title="Find wp-config.php">
    Navigate to your WordPress installation's root folder. For your main domain, this is usually `public_html`. Select `wp-config.php` and click **Edit**.
  </Step>

  <Step title="Add the memory limit line">
    Find the line that reads:

    ```php theme={null}
    /* That's all, stop editing! Happy publishing. */
    ```

    Add this line directly above it:

    ```php theme={null}
    define( 'WP_MEMORY_LIMIT', '512M' );
    ```
  </Step>

  <Step title="Save">
    Click **Save Changes**.
  </Step>
</Steps>

You can set the value to whatever your hosting plan allows. Check your plan's memory allocation on the [resource limits](/web-hosting/resource-limits) page.

<Warning>
  Setting `WP_MEMORY_LIMIT` higher than your hosting plan's actual memory limit has no effect. WordPress can only use up to the limit allocated to your cPanel account.
</Warning>

<Tip>
  If you also need to increase the PHP-level `memory_limit` (which caps all PHP scripts, not just WordPress), you can do that in the [PHP Selector](/web-hosting/php-version#adjust-php-settings).
</Tip>
