How to Increase Memory limit in cPanel
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)
Log in to your cPanel.
Go to Software section.
Click on MultiPHP INI Editor.
Under Basic Mode, select your domain from the dropdown.
Look for memory_limit.
Change the value (e.g.,
256M
,512M
, etc.).Click Apply.
Method 2: Editing php.ini
(If Allowed)
In File Manager, go to the root directory of your website (e.g.,
public_html
).Look for a
php.ini
file, or create one if it doesn’t exist.Add or edit the line:
Save the file.
Some servers may ignore this if custom
php.ini
overrides are not allowed.
Method 3: Editing .htaccess
(Alternative)
Go to File Manager.
Locate and edit the
.htaccess
file in the root folder (public_html
).Add or modify the following line:
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)
Go to your WordPress root directory.
Edit the
wp-config.php
file.Add the following line before the line that says
/* That's all, stop editing! */
: