How to increase memory_limit using .htaccess in cPanel?

Please refer to the following steps to increase PHP memory_limit.

  1. Login to your cPanel. Please refer to how to open cPanel.

  2. Click on the file manager and find the .htaccess file for your website. If you don't have an existing .htaccess file then you can create a new .htaccess file. Please refer to how to create a file in cPanel.

  3. Open the .htaccess file and add the below line. You can change PHP memory_limit as per your requirement.

    # <IfModule mod_php7.1>
        php_value memory_limit 64M
    </IfModule>
  4. Create a php info file. Please refer to how to create a phpinfo file for more details.

  5. Access the phpinfo page in the browser and verify your memory_limit that you have set.

Related Articles

How to configure Google G Suite MX Records in a cPanel Hosting Account?

Please refer to the following steps to configure Google G Suite MX Records in a cPanel. Login...

How to create a website using RVsitebuilder 7 in cPanel?

Please refer to the following steps to create a website using RVsitebuilder 7.  Login to your...

How To Automatically Delete Forwarded Mails in cPanel?

You can use cPanel email forwarder option to forward your emails to any other email account....

How to set Global email filters in cPanel to discard any email?

Suppose you are receiving spam emails with the specific subject line contains the word buy. Now,...

How to Restrict Addon Domains Folder Accessing from Main Domain in cPanel?

If you are running your websites under cPanel and have addon domains linked with subdomains and...

  • 0 Users Found This Useful

Was this answer helpful?