WordPress (currently 3.5.1) limits the memory usage to 32M for single-site installations and 64M for multi-site installations on the front-end. In the back-end it is set to 256M (if possible) by default. This is done in the PHP-code, it means that your current web server setup needs to allow setting php.ini variables from code.
So to increase the amount of memory allowed above 256M you will first need to make sure that PHP-code is allowed to change php.ini settings. In Apache this is typically done by defining theÂ âAllowOverride Optionsâ or âAllowOverride Allâ in your vhost-file.
However, no matter how much memory you define in
.htaccess, WordPress will never set a higher value then 256M. Why? Because there are two constants that defines this behavior.
Define the following two constants in
wp-config.php to set the amount of memory that WordPress should be allowed to use:
// Front-end define( 'WP_MEMORY_LIMIT', '512M' ); // Back-end define( 'WP_MAX_MEMORY_LIMIT', '512M' );
Why do I need more then 256M of RAM? Well, if you are asking that question, you probably should not change this value. But if you, like me, are hitting some memory limits due to long running tasks, you might not have an option but to raise the amount of RAM available to WordPress (PHP).
Feel free to leave a comment using the form below.
September 12, 2018 at 10:49 AM
[…] Read More on|Read More|Find More Infos here|Here you will find 96090 additional Infos|Informations on that Topic: webartisan.se/wordpress-memory-limits-going-beyond-256m/ […]
September 18, 2018 at 8:41 PM
[…] Read More here|Read More|Find More Informations here|There you can find 35946 more Informations|Infos to that Topic: webartisan.se/wordpress-memory-limits-going-beyond-256m/ […]
September 19, 2018 at 1:59 PM
[…] Find More on|Find More|Read More Infos here|There you can find 52797 more Infos|Informations on that Topic: webartisan.se/wordpress-memory-limits-going-beyond-256m/ […]