Increase PHP Memory Limit in CyberPanel

After installing CyberPanel, many configurations come with their default values. For example, memory_limit comes with predefined values ​​upload_max_filesize and post_max_size. Sometimes we need different configurations or values ​​according to the needs of our website. We can easily change or adjust these configurations and values ​​directly from the CyberPanel dashboard with some tweaking.

Check below to set these predefined configurations accordingly:

Edit PHP Configurations in CyberPanel

Log into your CyberPanel dashboard using port 8090 to edit PHP configurations. On the right side of your screen, scroll down the page and PHP

:8090 > PHP > Edit PHP Configuration > Basis

Cyberpanel Php Configurations
Cyberpanel Php Configurations

click PHP and choose Edit PHP Configurations from the drop-down menu. On the next page, under Basic, select the PHP version you want to edit. Currently we recommend using PHP 7.4 which is fast and stable.

Php 7.4 Configuration Cyberpanel
Php 7.4 Configuration Cyberpanel

After selecting PHP 7.4 you will see the configuration options. You can set the values ​​here.

increase memory_limit

Delete and enter the current memory_limit value 2048 million. Alternate 256M or 512M.

Increase upload_max_filesize

Delete and enter the current value of upload_max_filesize 2048 million. Alternate 256M or 512M.

increase post_max_size

Delete and enter existing post_max_size 2048 million. Alternate 256M or 512M.

Set max_execution_time to 300 and max_input_time to 60.

click Save Changes and then start PHP button.

Wait… not here.

Changes will not be reflected until you restart LiteSpeed.

To restart LiteSpeed, click on the settings icon next to the exit button in the upper right corner of your CyberPanel control panel.

Cyberpanel Settings Shortcut
Cyberpanel Settings Shortcut

Click Situationwill open the server status page. click LiteSpeed ​​Status.

Litespeed Status
Litespeed Status

On the next page, click Restart LiteSpeed button.

Restart Litespeed
Restart Litespeed

Alternatively, you can use the SSH terminal to restart LiteSpeed.

Log in to terminal and run the following command to restart LiteSpeed:

/usr/local/lsws/bin/lswsctrl reload

OR

/usr/local/lsws/bin/lswsctrl restart

All your settings are now saved.

Identify these changes

Still have doubts about whether these changes will work? You can easily define them in your CyberPanel control panel. Click for it databases on the right side of your control panel. Select PHPMyAdmin from the drop-down menu.

PHPMyadmin Cyberpanel
PHPMyadmin Cyberpanel

Click Import and check MySQL file upload size. (Max: 2.048MiB).

Check PhpMyAdmin php version if not changed. If it’s 7.3.x, change the values ​​accordingly.

Phpmyadmin Php Version
Phpmyadmin Php Version

Enjoy!

explanation

When you buy through affiliate links on our site, we may earn an affiliate commission at no cost to you.

Related Posts

Leave a Reply

Your email address will not be published.