PHP allocates a certain amount of memory when executing PHP scripts. When the allocated memory is exhausted, the PHP script shows a fatal error:
Memory Limit Error
Please note that the memory_limit
value should be set to at least as big as post_max_size
.
Follow These Steps to Increase memory_limit
in cPanel
-
Log into your cPanel from within your 4xhost client account.
-
Locate and Select the PHP Version Menu:
- In the Software section, find the PHP version menu.
-
Click the Options Section:
- Look for the options related to the
php.ini
values and scroll down to findmemory_limit
.
- Look for the options related to the
-
Set the Value:
- Adjust the
memory_limit
to the desired value. Once you’ve made the change, make sure to left-click anywhere outside the text input or drop-down box.
- Adjust the
-
Confirmation:
- You will see a green box with a message confirming that the change has been applied.
To confirm whether your changes have taken effect, you can create a phpinfo.php
file. Follow the steps in this guide to create the file and check the current memory_limit
value.