How to increase memory limit for PHP in cPanel

PHP allocates a certain amount of memory when executing your PHP scripts. Your PHP script will exit and throws a fatal error if it has exhausted all the allocated memory.

PHP Fatal error: Allowed memory size of xxxx bytes exhausted (tried to allocate yyyy) in yourscript.php

Limiting memory allocation prevents PHP from consuming too much memory from the system. However, you can configure PHP to increase the memory limit if your script or application requires more memory for execution.

You can configure memory_limit option for PHP in cPanel hosting from the dashboard.

Steps to change memory limit for PHP in cPanel:

  1. Log in to your cPanel account.

https://sive.host/titfombe/repository/Login%20to%20cpanel

2. Click on Select PHP Version from the Software section.

https://sive.host/titfombe/repository/Software.png

3. Click on Options tab at the top of the page

https://sive.host/titfombe/repository/PHP%20Selector.png

4. Find memory_limit option and click on the dropdown icon, select the desired memory limit from the list and then wait for the change to be saved automatically.

https://sive.host/titfombe/repository/Memory%20option.png

 

 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to generate/download a full backup

A full backup is a backup of all of your files, e-mail, databases, etc. To run a full backup, you...

How to create an FTP account in cPanel

An FTP account is used for uploading and managing files on your website. An FTP account is...

cPanel logs for access, Apache, email, error, ftp, mysql, and WHM

cPanel logs for access, Apache, email, error, ftp, mysql, and WHM cPanel logs most activity that...

Default Mail Addresses in cPanel

Default Mail Addresses in cPanel Category: Technical Support If you manage a domain, sooner...

How to Stop Email Spam Bots Using SMTP on Your VPS

How to Stop Email Spam Bots Using SMTP on Your VPS The Problem The email said that I had...