You may run into an issue when working with your WordPress / WooCommerce website that asks you to increase the WordPress memory limit. The easiest way to accomplish this is by editing your wp-config.php file.
HOWTO: Increase WordPress Memory Limit
- Log into cPanel and use File Manager to right-click edit your wp-config.php file for appropriate website in root directory
- Find the line
/* That's all, stop editing! Happy publishing. */
- Right above this line, add the code
define('WP_MEMORY_LIMIT', '256M');
- Select Save
An alternate method of setting the WordPress memory limit is to edit your wp-config.php file via FTP.
Why am I getting a PHP memory error?
- Too many Plugins
- Outdated or sloppy bloatware Theme
- Large Media Files Like Videos
Misc Errors
- Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 32768 bytes) in /home/website/public_html/wp-content/themes/Divi/functions.php on line 7671
- Increase the PHP Memory in the .wp-config File to solve fatal error: allowed memory problem with WordPress website.
- PHP Warning: Use of undefined constant ‘WP_MEMORY_LIMIT’ β assumed ”WP_MEMORY_LIMIT” (this will throw an Error in a future version of PHP) in /wp-config.php on line 420