Highlightlinuxupdate

PHP Selector How To: Force All Users To Use Default Version

When using CloudLinux with PHP Selector, you may need to force all existing users on a server to use a correct version of PHP. While Plesk makes this easy by setting a PHP version to an alt-php version, PHP Selector will still default to 5.4 meaning sites won’t load.

We’ll need to do two things. Firstly we’ll need to set a default version of PHP. SSH into your server, elevate to root, and run this to set PHP 7.4 as your default version within PHP Selector.

selectorctl --set-current=7.4

Now you need to reset all existing users PHP versions using:

cagefsctl --cl-selector-reset-versions

Note: If any users have customised extensions enabled/disabled, or have picked a version themselves this will reset them to default.

Jonathan Procter

Linux, Unix, and Windows server sysadmin.

Related Articles

Back to top button