Introduction
CloudLinux PHP selector default settings are applied when a new account is configured. If the default settings are changed after an account is configured, these settings aren't applied to existing accounts. This guide contains the details required to reset the PHP settings back to the defaults after default settings have changed.
Procedure
- Reset user extensions to default settings:
selectorctl --list-users --version=5.6 | sed -e 's/,/\n/g' | sed 's/^/selectorctl --reset-user-extensions --version=5.6 --user=/'
- If you run it:
1. The script will generate a list of users who use PHP 5.6
2. The script will generate a separate command to reset the modules for each user
3. If you add | sh at the end of the command, PHP modules will be reset for all users that have PHP 5.6 Example:
selectorctl --list-users --version=5.6 | sed -e 's/,/\n/g' | sed 's/^/selectorctl --reset-user-extensions --version=5.6 --user=/' | sh
You can find additional useful commands for PHP selector at the below resource:
PHP Selector's Useful Commands (Change PHP Versions/Extensions for all users, etc.)