There was a problem loading the comments.

How to increase memory limit for PHP in cPanel

Support Portal  »  Knowledgebase  »  Viewing Article

Your PHP script will exit and a fatal error will be thrown if it has exhausted all the allocated memory.

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

This is to protect the system in the case that a rogue PHP script or application consume more memory that the system can handle.
You can fix the issue by allocating more memory to your PHP scripts and there are a few ways to do this.

For cPanel hosting, you can change the memory limit configuration from your cPanel dashboard.

Steps to change memory limit for PHP in cPanel:

  1. Log in to your cPanel account.

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

30558111827b172b00a424aacecadb00cadff47b?t=5d7d507447ac304123bf153d3709d3e2 3. Click on Options tab at the top of the page. 

4. Find memory_limit option and click on the dropdown icon.

081ac8f98b6c6bd6bb55c51ce3248262efb5ac05?t=4f2335ebb3ac8e5a4a462b7f3cf89e87 951dcb41d3f16cdcd70e4ad9c7390bdebe4b6d6b?t=29b7d3ad941ae76788b9ffd0f36a02a1 5. Select the desired memory limit from the list.

40d389baae3123e6ac2f34012aa16e4d688a4830?t=8e51dda510769990719c2781d9d8a426 6. Wait for the change to automatically be saved.


Share via
Did you find this article useful?  

Related Articles


Add Comment

Replying to  

© Getspace - EU