Increase PHP Memory Limit in CyberPanel
After Installing CyberPanel, many configurations come with their default values. For example, memory_limit, upload_max_filesize, and post_max_size come with their predefined values. Sometimes we need different configurations or values according to our website needs. We can easily change or adjust these configurations and values right from the CyberPanel dashboard with some tweaks.
Webs.org provides free advice on marketing, Internet ads, classified ads, domain names, web hosting and website design. It is brought to you by URLs.net.
Check below to properly adjust these predefined configurations:
Edit PHP Configurations in CyberPanel
To edit PHP configurations, log in to your CyberPanel dashboard using the 8090 port. On the right side of your screen, scroll down the page and find PHP
:8090 > PHP > Edit PHP Config > Basic
Click on PHP and select Edit PHP Configs from dropdown. On the next page, under Basic select PHP version that you want to edit. We recommend use PHP 7.4 that is fast and stable at this moment.
After selecting PHP 7.4 you will see its configuration options. You can adjust values here.
Increase memory_limit
Delete existing value of memory_limit and enter 2048M. Alternative 256M or 512M.
Increase upload_max_filesize
Delete existing value of upload_max_filesize and enter 2048M. Alternative 256M or 512M.
Increase post_max_size
Delete existing value of post_max_size and enter 2048M. Alternative 256M or 512M.
Set max_execution_time to 300 and max_input_time to 60.
Click on Save Changes and then Start PHP button.
Wait… its not over here.
Changes will not reflect, until you restart LiteSpeed.
To restart LiteSpeed, click on the settings icon near logout button on right top corner of your CyberPanel dashboard.
Click on the Status, it will open server status page. Click on LiteSpeed Status.
On next page, click Reboot LiteSpeed button.
Alternatively, you can use SSH terminal to reboot LiteSpeed.
Login to terminal and fire the following command to restart the LiteSpeed:
/usr/local/lsws/bin/lswsctrl reload
OR
/usr/local/lsws/bin/lswsctrl restart
Now your all the settings have been saved.
Identify these changes
Do you still have doubts about these changes working or not? You can easily identify these right in your CyberPanel dashboard. For this, click on Databases on the right side of your dashboard. From the dropdown, choose PHPMyAdmin.
Click on import and check the MySQL file upload size. It should be (Max: 2,048MiB).
If it is not changed, check PhpMyAdmin php version. If it is 7.3.x then Change the values accordingly.
Enjoy!
The post Increase PHP Memory Limit in CyberPanel appeared first on InsideHost.