Get your free beta license ↗
Websites · PHP

A site fails because a PHP extension is off

Last updated 30 Nov 2026
Summary

A site can fail with Class "Redis" not found when an extension it needs is off for its PHP version. One command lists the extensions, and another turns on the one the site needs.

Symptoms

The page returns 500 Internal Server Error. The domain's PHP log, shown by urbestack-domain-log --name example.com --type php, contains this line.

Output
[30-Nov-2026 08:28:20 UTC] PHP Fatal error:  Uncaught Error: Class "Redis" not found in /home/USER/files/web/example.com/public_html/r.php:1

The same kind of error can occur with other extensions. The message names a class or function from the extension the site needs.

Cause

Each installed PHP version has its own extension settings. Those settings apply to every site on that version.

Extensions such as redis and memcached are off until an administrator turns them on.

Resolution

  1. List the extensions and their states for each installed PHP version.

    urbestack-php-ext-list
  2. Find the site's PHP version in the php_running field of urbestack-domain-list. Turn on the extension for that version. This example turns on redis for PHP 8.4. UrbeStack installs the extension's package and the packages it needs, then reloads PHP for that version.

    urbestack-php-ext-set --name redis --on --version 8.4
  3. Use --all-versions to turn on the extension for every installed version.

  4. Run urbestack-php-ext-list again to check that redis is on for the site's PHP version.