Question:
php_value memory_limit?
BestQuestion
2010-05-06 08:56:45 UTC
what is this php_value memory_limit found in .htaccess for?
my site is loading way to slow and takes time to load pages same times up to 1 minute...?
Three answers:
Marietha
2016-05-24 06:50:06 UTC
Hi



It's possible that you're running out of resources on your site.

Your server side language will determine, set and make available that memory that may be used.



In the case of WordPress, the server side language is PHP so the memory_limit of PHP will be configured globally on the server, for the domain specifically.



In a result of running out of memory or resources you will get a blank page / fatal error stating the issue.



You can increase your PHP memory limit and /or max_execution time.



There are a few ways to increase PHP memory limit.

1.) Setting Memory Limit in wp-config.php - define('WP_MEMORY_LIMIT', "256M");

2.) Memory Limit PHP Directive in .htaccess file - php_value memory_limit 256M

3.) Changing Memory Limit in php.ini - memory_limit = 256M

4.) Set PHP Memory Limit During Runtime - ini_set('memory_limit', "256M");



If none of these are working, please ask your hosting provider to increase it for you, you can also ask your hosting provider to increase your max_execution time.



Regards

Marietha
Stephan W
2010-05-06 17:02:06 UTC
It limits how much memory a php-script may use it it wants to.



If your script takes too long there is most probably another error in your code.
?
2016-12-05 10:11:47 UTC
straight forward, you only could set the ini values and timeout values at run time: e.g. ini_set(upload_max_filesize,8096) //8MB ini_set(max_execution_time,3 hundred) //circumstances out after 5 minutes ini_set(post_max_size,8096) ini_set(memory_limit, 8096) you could face not greater issues inspite of each and every thing.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...