ULIX TxT Editor on Sourceforge.net

Increasing PHP memory using htaccess

It is important to note that when it comes to increasing your websites memory for php files, the best solution is to do it using the htaccess file. Simply add this piece of code to your htaccess document, and you're done.

Simple Technique

Make sure that you have this code at the bottom of your .htaccess file in order for this Memory Increase to take effect.
php_value memory_limit 64M

Advanced Technique

Go to your .htaccess file and add or edit the following code at the very bottom:php_value upload_max_filesize 1000M
php_value post_max_size 2000M
php_value memory_limit 3000M
php_value max_execution_time 180
php_value max_input_time 180
Change the values to limits that best suit your needs. Don't forget to save when you're done


The M means megabytes. Change the 1000M, 2000M and 3000M limit to the value with which you feel most comfortable. Changing the value of max_execution_time will limit the amount of time spent loading a script in seconds. In many cases, the values you enter should get larger as you go down the list from lines one to three. The upload_max_filesize should be the smallest while memory_limit should be the largest. The median should be post_max_size.