How to adjust memory_limit and other PHP settings in the Virtualmin Control Panel

To adjust the PHP memory limit using Virtualmin, do the following:

1. Log into Virtualmin
2. From the dropdown at the top, choose the requisite virtual host that you want to change the settings for, then:

Services -> PHP 7.2 configuration

How to adjust PHP resource limits

Description of the limits:

  • memory_limit (Maximum memory allocation)
  • upload_max_filesize (Maximum file upload size)
  • max_input_time (Maximum input parsing time)
  • post_max_size (Maximum HTTP POST size)
  • max_execution_time (Maximum execution time)

Once you have made the changes, click Save. You do not have to restart Apache as the new settings will take affect after a couple of seconds.

If you want to change the maximum execution time of a PHP script, navigate to:

Server Configuration -> Website Options

There you will find max_execution_time

Maximum PHP script run time

When PHP scripts are run using FCGId mode, this field sets the maximum time each script call can run for. You may need to increase it when hosting scripts that have particularly high run times, and are timed out by your web server configuration before completion.

If you are unsure which PHP version you are using, navigate to:

Server Configuration -> PHP Versions

Note for WHMCS users:

You may need to adjust limits if you’re using WHMCS, for example, see the WHMCS recommended settings here:

  • A PHP Memory limit of at least 128MB
  • PHP max_execution_time in excess of 60 seconds

https://docs.whmcs.com/Automatic_Updater

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top