# Set Default Package Versions

In ServBay, you can set default package versions for command line support to be used by default when running commands in the command line or related scripts, supporting PHP, MariaDB, PostgreSQL, and more. Here are the detailed instructions for setting default package versions:

  1. Open the ServBay.

  2. Click on "Settings" in the left navigation bar.

  3. In the settings page, find the "Default Version" option.

  4. In the drop-down options, choose the default versions for PHP, MariaDB, and PostgreSQL, respectively.

  5. Click the "Apply" button to apply the changes.

After setting the default versions, 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 invoke version 8.1 using the php-8.1 command, like php-8.1 -v, which will output PHP 8.1.x (cli).

Similar settings apply to MariaDB, PostgreSQL, and other packages. Note that in the service management page, you can see a pin icon to the right of the service name set as the default version, indicating that this version is the default.

Last Updated: 11/23/2023