Now CWP has a PHP Switch option where you can very easily switch to other PHP version and recompile it with desired modules.

How to use it?

- Click on PHP Version Switcher (here you will get server PHP version and compiled modules which your server has now compiled).
- Select PHP Version you wish to compile in drop-down menu and click next.
- In PHP compiler you can add or remove modules you want.
- Click on Start compiler and compiler will start to work in background.

Compiler needs from 5 to 20 minutes to finish, depending on modules you are installing and your CPU power.
You can return in eg. 15 minutes and in CWP - PHP Version Switch check which version of PHP and modules you have now.

Your websites and CWP will work during compiler process and PHP will be update when the compiler is completed.

You can check for PHP compile logs in the file:

If you wish to monitor compiler then use this command from the shell:
tail -f /var/log/php-rebuild.log

How to add custom build flags to php switcher?
This can be done by editing configuration files, configuration files are located here: /usr/local/cwpsrv/htdocs/resources/conf/php_switcher/


And at end of this file we add:


Under square brackets [shmop-test] you create name you will use for build, must be unique and not previously defined in the file.
Under option you need to define build flags.

After editing you are ready to build you new php from CWP PHP switcher .

** Please note that cwp update will overwrite this files!