Here we will cover how to solve the Allowed Memory Size of ######## Bytes Exhausted error. This error typically occurs when a plugin or theme is using more than the maximum allocated PHP memory limit for the site.
By default, this setting is set to 32M, which isn't usually high enough for sites with many plugins. We can increase it by using the MultiPHP INI Editor in cPanel or by increasing the setting in the wp-config.php file.
Making PHP INI changes is essential if your website is showing an error similar to:
Allowed Memory Size of ######## Bytes Exhausted (tried to allocate ######### bytes)
Related Articles
Modify Global PHP Settings
Update PHP Version with MultiPHP Manager
Verify WordPress Checksums
Increase the Memory Limit with the MultiPHP INI Editor
- Log into cPanel
- Open the MultiPHP INI Editor, located in the Software section
- Under the Basic Mode tab, select the relevant domain from the drop-down menu
- Find the memory_limit setting
- Change the setting to 256M
NOTE: If the memory_limit setting isn't listed, use the Editor Mode tab and manually enter:memory_limit = 256M
. Alternatively, use the wp-config.php method below. - Click Apply at the bottom of the screen
- Navigate to your website and refresh the page to see if the error is gone
TIP: If you're still seeing the error, try clearing your browser cache and the NGINX cache if your server is using NGINX. - If the error persists, edit the PHP INI again and change the limit from 256M to 512M
Increase the Memory Limit through the wp-config.php File
- Log into cPanel
- Open the File Manager, located in the Software section
- Navigate to the document root of the website
- Locate the wp-config.php file
- Right-click the file and select Edit
- Locate the section that says, "Add any custom values between this line and the 'stop editing' line"
- Add
define('WP_MEMORY_LIMIT','256M');
in that section - Click Save Changes on the top-right of the screen
- Navigate to your website and refresh the page to see if the error is gone
TIP: If you're still seeing the error, try clearing your browser cache and the NGINX cache if your server is using NGINX. - If the error persists, edit the wp-config.php file again and change the limit from 256M to 512M
Comments
0 comments
Article is closed for comments.