How can we help you?

How to enable PDO Extension on my domain?

Ella McMorran
Written by
Ella McMorran

PDO (PHP Data Objects) provides a consistent interface for database access in PHP. Most modern PHP applications require it for MySQL, PostgreSQL, or SQLite connections. CloudLinux lets you enable it per-domain without affecting other accounts.

To enable PDO extension for your domain:
  1. Log into your domain’s cPanel account
  2. Navigate to “Select PHP Version” in the Software section
  3. Change from “native” to a specific PHP version (7.4, 8.0, 8.1, etc.)
  4. Click “Set as Current” to apply the version
  5. In the PHP Extensions list, check both:
    • pdo (the core PDO extension)
    • pdo_mysql (for MySQL database connections)
  6. Click “Save” to activate the extensions

Changes apply immediately without restart.

Note

Note: These settings apply only to individual cPanel accounts, not WHM reseller accounts. Each domain must enable PDO separately.

Troubleshooting tip: If your application still shows PDO errors after enabling, check that you’ve enabled the specific PDO driver for your database type (pdo_mysql for MySQL/MariaDB, pdo_pgsql for PostgreSQL, etc.).