How to increase memory limit using .htacess

Issue:

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:
  1. Login to your cPanel and click on File Manager.
  2. 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"
  3. In the File Manager window, go to public_html folder and select .htaccess file.
  4. Click edit button on the top of the File Manager and will open a new window which allow you to edit .htaccess file.
  5. Add below line.
    php_value memory_limit 1024M
  6. You may change the value according to your application need.
  7. Once done, you need to click on the save button.
  8. You should be able to solve the issue.
Affected Application:

Joomla: may require 2048M to allow it to works.
Others: may work with 500M


Was this answer helpful?

Also Read

Page is displaying 404 Page Not Found error

The 404 Page Not Found error means that the user requested a page on the server that does not...

What is SSH?

SSH (Secure Shell) is a secure method for logging into a server remotely and giving the server...

What is ID Protection?

What is ID Protection? When a domain name is registered, some information (such as...

How to check your bandwidth usage in cPanel?

Bandwidth devices reads the traffic data that can be displayed in graph. Bandwidth usage is a sum...

How do I block an IP address from accessing my site?

If you wish to ban a user from accessing your website in any way, the best way to do this is to...