Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Neethu Ah's avatar

Class "PDO" not found

i uploaded my project wordpress hosting domain , and updated my php version to 8.0 but Class "PDO" not found error . its working in another domain perfectly . how to solve this

0 likes
7 replies
ramonrietdijk's avatar

Make sure you have the PDO (and probably pdo_mysql) extensions installed and enabled. You can check it by running php -m.

Sinnbeck's avatar

@Neethu Ah Based on the error it isnt

Add a file named phpinfo.php inside your project with this content, and call it in the browser. Look for PDO

<?php
phpinfo();
Sinnbeck's avatar

@Neethu Ah It shows your complete php configuration. Search the page for PDO

ramonrietdijk's avatar

@Neethu Ah If you don't see any PDO related information with phpinfo() the extensions are not enabled for your php-fpm process.

If you inspect the table, you will find Loaded Configuration File. Edit this file, search for the list of extensions (extension=) and add at least the following to the configuration:

extension=mysqli
extension=pdo_mysql

Don't forget to restart your php.

Depending on your environment, you can find some more documentation here.

1 like

Please or to participate in this conversation.