Knowledge Base
MilesWeb / How-Tos

How to Increase php Memory Limit using htaccess?

Approx. read time : 4 min

Watch this video for a step by step process on how to increase php memory limit using htaccess

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 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.

With over 10+ years of experience in the web hosting industry, I have achieved extensive exposure to result-oriented methodologies. And expertise in different domains like Datacentre Services, Cloud computing technology, Web hosting industry and many more.