0

I just install wp-cli.phar on my Wordpress project.

When I do --info I get something like this :

php wp-cli.phar --info
OS:     Windows ****
Shell:  C:\Windows\system32\cmd.exe
PHP binary:     C:\MAMP\bin\php\php7.3.7\php.exe
PHP version:    7.3.7
php.ini used:
MySQL binary:
MySQL version:
SQL modes:
WP-CLI root dir:        phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:      phar://wp-cli.phar/vendor
WP_CLI phar path:       C:\Users\***\Documents\Sites\test
WP-CLI packages dir:
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.5.0

But When I try to scaffold a Block it's says that

Error: Call to undefined function mysql_connect() in C:\Users\chatl\Documents\Sites\test\wp-includes\wp-db.php:1688

Ps : My php version is same as the current running mamp

Beatles BOB
  • 196
  • 11
  • Where are you running the command from? In order for (most) of the WP-CLI commands to work, you must run them either from the WordPress root (where `wp-config.php` is located) or from theme/plugin. In order to scaffold something, WP-CLI needs the info found in the `wp-config.php`. – dingo_d Aug 20 '21 at 10:18

0 Answers0