The default allocated memory to any WordPress site can vary on your settings either at the system level (PHP Configurations) or how you set it up in WordPress.
When you get this kind of error ( Allowed memory exhausted), that means that your WordPress may no longer work with memory that’s allocated to it.
The only option would be to increase the memory limit.
There are multiple ways of doing it, but let me show you the easiest one
Open your wp-config.php file
If you have a line something similar to this
1 |
define('WP_MEMORY_LIMIT', '64M'); |
Then you will have to edit the above line and change 64M to say 256M
1 |
define('WP_MEMORY_LIMIT', '256M'); |
Basically what we are doing is to allow WordPress to use up to 256 MB system memory. Now if your system’s memory + pagecache doesn’t allow this expansion, you will need to add more memory to your server else you may potentially get other errors such as segmentation fault etc
Administration area requires much more memory to do things than that of your normal site pages, so if you put the setting below in your wp-config file, this will overwrite the WP_MEMORY_LIMIT when you are in doing tasks in WP admin area.
1 |
define('WP_MAX_MEMORY_LIMIT', '512M'); |
I hope this helps
Leave a Reply