Skip to main content

How to Change PHP memory_limit for a Domain in cPanel

You can increase or decrease the memory_limit for a specific domain to ensure your scripts have enough resources to run. This task is performed by a cPanel Account User and is managed through the MultiPHP INI Editor.

Before you begin

You will need:

  • A cPanel account with permissions to manage the specific domain.

  • The exact domain name or subdomain you wish to modify.

Adjusting the PHP memory_limit

  1. Log in to your cPanel account.

  2. Locate the Software section and select MultiPHP INI Editor.

  3. Find the domain you wish to modify in the list .

  4. Locate the memory_limit setting and enter the desired value (e.g., 256M or 512M).

  5. Click Apply or Save to apply the changes.

Confirm the result

  • The page will refresh or display a success message confirming the changes were saved.

  • You can verify the change by checking the PHP information page for that specific domain if a php.info page is present.

Troubleshooting

If the memory_limit does not change after you click save, ensure that the value you entered is a valid PHP memory limit format (e.g., 128M, 256M, 1G). If the value remains unchanged, the limit may be restricted by your specific hosting plan's maximum allowed values.

Limitations

The maximum value you can enter for memory_limit is determined by your hosting plan and the server's configuration. If you enter a value higher than what is permitted by your plan, the system may default to the highest available limit allowed for your account.

Did this answer your question?