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

# Changing the WordPress memory limit

> Some WordPress plugins require more WP memory to run PHP scripts. Learn how to modify the wp-config.php file to increase the WordPress memory limit.

[WordPress](https://hosting.com/hosting/platforms/wordpress-hosting) sets the PHP memory limit to 40MB by default, which means that a single PHP script can use up to 40MB of RAM. If you need more memory to run heavier plugins, you must increase the default memory limit. This article will show you how to increase WordPress's memory limits.

## View WordPress memory information

To view the WordPress memory limit, follow these steps:

1. Log in to your **WordPress** site with an administrator account.

2. On the **Dashboard** in the left sidebar, click **Tools**, and then click **Site Health**:\
   ![](https://static.hosting.com/kb/Wordpress_sitehealth.png)

3. Click on the Info tab, and then click WordPress Constants:\
   ![](https://static.hosting.com/kb/Sitehealth_info.png)

4. The WordPress memory settings are listed WordPress Constants:\
   ![](https://static.hosting.com/kb/WordPress_Constants.png)

## How to modify WordPress memory limit

To increase WordPress memory limit, follow these steps:

1. Login to **cPanel**, and then click on **File Manager**:\
   ![](https://static.hosting.com/kb/cPanel_FileManager.png)

2. On the **File Manager**, search for **wp-config.php**, and then click **Go**:\
   ![](https://static.hosting.com/kb/search_wpconfig.png)

3. Right click on **wp-config.php**, and then click **Edit** to edit the **wp-config. php** file:\
   ![](https://static.hosting.com/kb/wpconfig_edit.png)

4. Search for the following lines in wp-config.php to change the memory allocation:

```
define( 'WP_MEMORY_LIMIT', '40M' );
```

5. Change the memory from 40MB to either 64MB or 128MB. (if these lines are not available, move to the next step).

6. Add the following lines in the wp-config. php file right above "That's all, stop editing! Happy publishing":

```
define( 'WP_MEMORY_LIMIT', '64M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); 
```

7. Click on **Save Changes** to change the WP memory limits:\
   ![](https://static.hosting.com/kb/wpconfig_savechanges.png)

8. On the WP admin dashboard, in the left sidebar, click Tools, and then click Site Health. On the info tab, click on WordPress Constants to view the memory limit changes
