Skip to content

Knowledgebase

Selecting PHP versions and execution modes in Virtualmin

control-panels, development

Virtualmin can select different installed PHP versions and execution modes per domain. PHP-FPM is the recommended general execution mode in current Virtualmin documentation, but application compatibility and installed handlers still need checking.

What you need before you begin

Record the current domain version, handler and application extension requirements. Choose a supported PHP release and take a recoverable backup. Server-wide installation of an additional PHP runtime requires an authorized administrator and trusted repositories compatible with the operating system.

01 Select PHP versions and execution modes in Virtualmin

  1. If the required version is missing, the administrator should follow the current Virtualmin multiple-PHP procedure for that operating system and install the needed runtime plus application extensions. Avoid copying obsolete version numbers from examples.
  2. Run System Settings > Re-Check Configuration so Virtualmin detects the available versions and execution modes.
  3. Select the exact virtual server, then open Web Configuration > PHP Options. Choose the compatible installed PHP version and execution mode, recording the previous values.
  4. Apply the change to a test or staging site first where practical. Confirm the application does not depend on configuration behaviour specific to the previous handler.
  5. Test login, uploads, routing and database activity, then inspect website and PHP logs.
  6. Review cron and CLI commands separately. An explicit old executable path is not automatically rewritten when the website PHP selection changes.

Will changing the server template update existing domains?

A template defines defaults for new virtual servers. Inspect and change existing domain settings deliberately rather than assuming a template edit has migrated their active PHP runtime.

Confirm the expected result

Confirm the effective runtime in the same web request path used by visitors. Remove public diagnostic files after use. Check required extensions and successful background tasks before applying the same change to other domains.

Troubleshoot unexpected results

For a failed site, restore the recorded domain handler/version and investigate the first application error. Missing extensions and incompatible application code need different remedies. Do not replace the operating-system PHP default for every service merely to fix one virtual server.

Was this answer helpful?

Need a little more help?

Our support team can help you find the next step.

Contact support