[Music] hello welcome to this CWP tutorial on how to manage PHP version switchers and selectors on control web panel CWP gives you three main tools to manage your PHP settings and these are all located in the PHP settings submenu in the sidebar on your admin panel these are PHP version switcher PHP selector 2 and PHP fpm selector each tool can run versions PHP 5. 3 point 4 point 5 point 6 and 7. 0 point 1 point 2 and point 3 right up to the latest build PHP version switcher is the main PHP version in CWP which is used as a default for all new clients and domains PHP selector allows multiple PHP versions which different users can run all at the same time with a different version per folder so you can actually run unlimited instances of all available PHP versions at the same time with each running in a different folder PHP fpm selector allows you to run any single version of PHP fpm per domain or subdomain under the same account this is activated in the web service domain configuration from the sidebar menu in the c WP admin panel this also allows you to use different web server setups with each version for example you can run various combinations of nginx Apache and varnish best of all is that you're not forced to choose just one switcher or selector because CWP lets you combine them for example you could use PHP switcher to run PHP 5.
6 on your root domain and then use PHP selector 2 to run versions 5. 4 and 5. 3 on different subfolders in that same domain and then you could use PHP fpm selector to run version 7.
2 and 7. 1 on different subdomains under that same root domain let's take a look at HP version switcher PHP version switcher shows your current PHP version and you can check your loaded PHP modules here this opens the PHP short info page which you can also access here under the PHP settings to change your main PHP version you can just select from the drop-down list here from any of the available PHP versions and this will set the new default PHP for all new users and domains once you select a build you'll be given the option to configure your modules so for example if there's any modules that aren't currently selected you can just choose to check mark that box and then go ahead and save and build with one click if you want to check your PHP compile logs you can do so with the file manager you can just open up advanced file manager here from the sidebar and you'll find them in the folder path VAR slash log under PHP rebuild and you can check those here PHP switch also allows you to add custom build flags to do that simply access your admin file manager and navigate to user local CWP serve htdocs resources conf PHP switcher and from here you can modify the relevant file with your custom build flag you just scroll the bottom and at the end you can add your custom build and save but remember would be a good idea to save a copy of this a separate copy because on the next CWP update this file will be overwritten so if you save this as 7. 1 B then you'll be able to recopy your information back each time there's an update next let's take a look at PHP selector too similar to the PHP switcher you just have to select your version and configure your modules and save your configuration if you make any changes and then go back to the PHP selector to screen now you'll notice that we just configured those options without actually having selected a version and that's because the options configuration is global to all versions within this version so this configuration is good for every build of 7.
3 it is important however to choose your specific version for each PHP that you want to build because when you click start compiler any PHP s that are still marked change version will not be built so make you all of your selections before you click start compiler you can reset your options you can list your modules you can check your PHP info or edit your PHP ini from here you can start the compiler to build and install and this will take about 30 minutes by using PHP selector - you have the ability to change your version in each of your subfolders and this is done through the user file manager so to access that we'll open up our user accounts and list accounts and we'll find the user name that we want to modify and we'll click the tools icon to open panel and this will open our user panel so from here we can go to the file management submenu and open our file manager in the sidebar from the file manager we can access public HTML and then here we'll find the htaccess file and here we can use the icon to edit and in each folder where we want to run a different PHP version we only need to define it in the htaccess file so for example if we wanted this folder to run PHP 5.