DEV Community

ServBay
ServBay

Posted on

How to Set Default CLI Version

In ServBay, you can set the default version for command-line support to use by default when running command lines or related scripts. This supports PHP, Nodejs, MariaDB, PostgreSQL, and more. Here are the detailed instructions for setting the default version:

Open ServBay and click on “Settings” in the left navigation bar.

Image description

On the settings page, locate the “Default Version” option.

In the dropdown options, select the default versions for PHP, Nodejs, MariaDB, and PostgreSQL respectively.

Image description

Click the “Apply” button to apply the changes.

After setting the default version, for example, if you set the default PHP version to 7.4, running php -v in the command line will output PHP 7.4.x (cli).

If you need to temporarily execute a non-default version in the command line, such as PHP 8.1, you can use the php-8.1 command to call version 8.1, like php-8.1 -v, which will output PHP 8.1.x (cli).

Similar settings apply to MariaDB, PostgreSQL, and other packages. Please note that on the service management page, you can see a fixed icon next to the service name indicating that this version is set as the default.

Image description

Big thanks for sticking with ServBay. Your support means the world to us 💙.
Got questions or need a hand? Our tech support team is just a shout away. Here's to making web development fun and fabulous! 🥳
If you want to get the latest information, follow X(Twitter) and Facebook.
If you have any questions, our staff would be pleased to help, just join our Discord community, Telegram or Whats app.

Top comments (0)