How to Increase Memory limit in cPanel

You are here:
Estimated reading time: 1 min

To increase the memory limit in cPanel, you can follow one of several methods, depending on the hosting environment and access level. Here are the most common ways:


Method 1: Using MultiPHP INI Editor (Shared Hosting)

  1. Log in to your cPanel.

  2. Go to Software section.

  3. Click on MultiPHP INI Editor.

  4. Under Basic Mode, select your domain from the dropdown.

  5. Look for memory_limit.

  6. Change the value (e.g., 256M, 512M, etc.).

  7. Click Apply.


Method 2: Editing php.ini (If Allowed)

  1. In File Manager, go to the root directory of your website (e.g., public_html).

  2. Look for a php.ini file, or create one if it doesn’t exist.

  3. Add or edit the line:

    memory_limit = 512M
    
  4. Save the file.

Some servers may ignore this if custom php.ini overrides are not allowed.


Method 3: Editing .htaccess (Alternative)

  1. Go to File Manager.

  2. Locate and edit the .htaccess file in the root folder (public_html).

  3. Add or modify the following line:

    php_value memory_limit 512M
    

This may throw a 500 Internal Server Error if your server doesn’t allow php_value directives in .htaccess.


Method 4: Using wp-config.php (For WordPress Sites)

  1. Go to your WordPress root directory.

  2. Edit the wp-config.php file.

  3. Add the following line before the line that says /* That's all, stop editing! */:

    define('WP_MEMORY_LIMIT', '512M');
    

 

Was this article helpful?
Dislike 0

Author

Joshua

Web Hosting Geek Technical Support Staff G Online Sites