In this article, AZDIGI will guide you on how to change memory_limit on aaPanel.
In the process of using the website, we may encounter some problems with the parameters of the PHP version in use and common PHP parameters that we often need to change, such as:
- memory_limit: Limit the physical memory (RAM) that a PHP script can be used, set to -1 if you want unlimited.
- post_max_size: The maximum size of the uploaded data. To upload large files, this value must be greater than upload_max_filesize. And memory_limit must be greater than post_max_size.
- upload_max_filesize: The maximum size of the uploaded file.
In this article, AZDIGI will show you how to change memory_limit on aaPanel, and you can do the same with post_max_size and upload_max_filesize.
II. Change memory_limit on aaPanel
To change memory_limit on aaPanel, we follow these 2 steps.
Step 1: Access the aaPanel admin page
To access the aaPanel admin interface, we access the link
http://IP:8888 on the browser.
Below is my aaPanel interface:
After accessing the aaPanel admin page, we continue to step 2 to change the memory_limit on aaPanel.
Step 2: Change memory_limit on aaPanel
On the aaPanel admin page, select the App Store section on the left.
Find the PHP version you are using and need to change, then select the Setting button as shown below:
In the pop-up window, select Configuration as shown below:
Here you can change the memory_limit parameter arbitrarily, PHP set the default this parameter as 128M. For example, I need a memory_limit of 2GB, so I will set it to 2048M. By default, this parameter of PHP is 128M.
In this interface, you can change other common parameters such as post_max_size and upload_max_filesize. Then save with the Save button.
However, up to this step, the parameter changes have not changed immediately, but you need to restart this PHP version to be updated by selecting the Service section => Restart.
Next, you can check again by creating an info.php file with the following content to see the current full PHP parameters.
Below is the memory_limit parameter after I increase it to 2GB.
With just two simple steps, we successfully changed the memory_limit on aaPanel. This change will help PHP scripts that require more than 128M of physical memory to work smoothly and without sudden stops. However, you should not increase it too high if you encounter PHP scripts that use up the server’s RAM.
Hope this article will be of help to you. Wishing you success!
See more useful articles about aaPanel at the following link:
If you need assistance, you can contact support in the ways below: