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.

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

Cyberpanel Php Configurations
Cyberpanel Php Configurations

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.

Php 7.4 Configuration Cyberpanel
Php 7.4 Configuration Cyberpanel

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.

Cyberpanel Settings Shortcut
Cyberpanel Settings Shortcut

Click on the Status, it will open server status page. Click on LiteSpeed Status.

Litespeed Status
Litespeed Status

On next page, click Reboot LiteSpeed button.

Reboot Litespeed
Reboot Litespeed

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.

PHPMyadmin Cyberpanel
PHPMyadmin Cyberpanel

Click on import and check the MySQL file upload size. It should be (Max: 2,048MiB).

Enjoy!

Disclosure
When you buy through affiliate links on our site, we may earn an affiliate commission, at no cost to you.
      InsideHost
      Logo
      Register New Account
      InsideHost - Your ultimate hosting partner!
      Reset Password
      Compare items
      • Total (0)
      Compare
      2