How to increase memory limit using .htacess
You might have encountered cannot access to your website with error related to memory exhausted and system try to reserve memory with certain memory allocations.Solutions:
- Login to your cPanel and click on File Manager.
- It will open a new window to confirm that you are going to open a File Manager window. Make sure you have selected "show hidden files"
- In the File Manager window, go to public_html folder and select .htaccess file.
- Click edit button on the top of the File Manager and will open a new window which allow you to edit .htaccess file.
- Add below line.
php_value memory_limit 1024M
- You may change the value according to your application need.
- Once done, you need to click on the save button.
- You should be able to solve the issue.
Joomla: may require 2048M to allow it to works.
Others: may work with 500M
Was this answer helpful?