You can set memory limits
a) from php.ini
How do I set memory limit in WordPress?
Here's what you need to do:
- Locate or find your php. ini file. ...
- Use your favorite editor to open and edit your php. ini file.
- Look for the line that says 'memory limit = 32M'.
- Change the 32M or some other number to the desired limit (e.g. 256M or 512M).
- Restart your localhost or server after saving your changes.
b) Edit wp-config.php and increase wp_memory_limit
If you’re running low on memory, there’s a simple solution: increase the amount of memory you have access to! WordPress lets you set the current memory limit in its wp-config.php file via the
wp_memory_limit variable. However, this limit may be less than the amount of memory provided with your hosting plan.