# urbestack-php-ext-set

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-php-ext-set --name redis (--on | --off) (--version 8.4 ... | --all-versions) [--job ID] [--dry-run]
```

## Description

Turns one extension in the PHP extension catalog on or off for one or more installed PHP versions. Repeat --version to select multiple versions. Use --all-versions to select every installed version where the extension can be changed to the requested state. If no version qualifies, the command reports that there is nothing to change.

The command installs or removes the extension package for one version at a time. It reloads that version's PHP-FPM service for all sites using it, lets in-flight requests finish and checks the extension's modules with php -m.

When turning an extension on, the command reports what else the package manager pulls in. It refuses a removal that would also remove a base package or another enabled extension and includes the package manager's proposed changes in the refusal. For example, it refuses to remove pdo while mysqlnd depends on it.

The first failed or refused package change stops the run. The report names the remaining versions as skipped. UrbeStack runs only one PHP installation or extension change at a time. With --dry-run, the command only previews the package changes.

Use --job ID to record progress in an existing job. The job worker supplies this option so progress appears in the Jobs and PHP sections of the administrator's panel.

## Same in the API

- [POST /php/extensions/{name}](https://urbestack.com/docs/api/post-php-extensions-name.md): Queue a job to turn a PHP extension on or off
- [POST /php/extensions/{name}](https://urbestack.com/docs/api/post-php-extensions-name.md): Queue a job to turn a PHP extension on or off

## Command family: php

- [urbestack-php-ext-list](https://urbestack.com/docs/commands/urbestack-php-ext-list.md): Lists the PHP extension catalog for this server's distribution and shows each extension's state for every installed PHP version.
- [urbestack-php-install](https://urbestack.com/docs/commands/urbestack-php-install.md): Sets up the PHP package source and installs the base packages and default extensions for the selected PHP versions.
- [urbestack-php-list](https://urbestack.com/docs/commands/urbestack-php-list.md): Lists every PHP version known to UrbeStack with its upstream support status and the date its security fixes end.
- [urbestack-php-move](https://urbestack.com/docs/commands/urbestack-php-move.md): Moves selected domains to a different PHP version or changes whether they follow the server default.
- [urbestack-php-notify](https://urbestack.com/docs/commands/urbestack-php-notify.md): Emails owners of selected domains running PHP versions whose security support has ended or ends in fewer than 120 days.
- [urbestack-php-pool-list](https://urbestack.com/docs/commands/urbestack-php-pool-list.md): Lists domain pools that reached their PHP-FPM child process limit (pm.max_children) in the last 14 days, ordered by warning count with the highest first.
