Knowledge Base Hub

Browse through our helpful how-to guides to get the fastest solutions to your technical issues.

Home  >  How-Tos  >  How to increase php memory limit using htaccess ?
Top Scroll

How to increase php memory limit using htaccess ?

 2 min

When installing any CMS, eCommerce, chat, forum, gallery, blog software there is a need for few scripts with higher memory limit. On the server memory limit is set to 8 to 12 MB & is never recommended to be on the higher side.

If any of your scripts under your hosting account requires a higher memory limit, you can increase it for your hosting account itself from .htaccess file which sits under public_html OR httpdocs directory.

Create a .htaccess file under root directory & add the code below. This is incase you need to increase it to 32MB. Make sure your webhost allows “AllowOverride On” in apache config file.

php_value memory_limit 32M

Once done, to test the memory limit for your account, create a phpinfo page. Browse the URL yourdomain.com/phpinfo.php. See, it it has been increased according to the one you have set.

<?php phpinfo(); ?>

If you face any issues with memory limit, signup with our hosting plans & increase it according to your needs.

For our Knowledge Base visitors only
Get 10% OFF on Hosting
Special Offer!
30
MINS
59
SECS
Claim the discount before it’s too late. Use the coupon code:
STORYSAVER
Note: Copy the coupon code and apply it on checkout.