Skip to main content

[FIXED]: drush The specified database connection is not defined: default

Fixing this took me years... I can't believe how long it took. The answers on stack overflow did not help.

The error was due to a mismatching php configuration for running in the shell ( /etc/php/8.1/cli/php.ini ) and in apache (/etc/php/8.1/apache2/php.ini ).

Specifically, I had to enable short tags for the shell: 

short_open_tag = On

With that, this particular error was fixed, and I was off to fixing the next error!

drupal waves

https://cityad-all-prod.s3.amazonaws.com/public/2025-04/400x400%20drupal-water-drop%20tiny.png
Please login to post comments: _TODO