1

I've been asked, by my remote host, to develop with drush 8, rather than drush 9. I need to revert my D8 ddev container from drush 9 to drush 8.

I'm using ddev out-of-the-box Drupal 8 recipe which gives .ddev/config.yaml of:

APIVersion: v1.6.0
name: 52ca
type: drupal8
docroot: web
php_version: "7.1"
webserver_type: nginx-fpm
router_http_port: "81"
router_https_port: "444"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.2"
webcache_enabled: false
nfs_mount_enabled: false
provider: default

ddev exec drush --version gives

Drush Commandline Tool 9.4.0

I'll be using drush cex on local and drush cim on remote.

I'm hoping I can ask ddev to use Drush 8 instead of Drush 9, but how?

mbomb007
  • 3,788
  • 3
  • 39
  • 68
nigelwhite
  • 15
  • 7

1 Answers1

0

As of May 2019, the drush in /usr/local/bin/drush is drush 8.

But drush8 acts as a drush launcher for the site-local drush; Most standard D8 projects have a site-local drush9 in them (in vendor/bin/drush), especially if built with https://github.com/drupal-composer/drupal-project.

Your drush 9 is apparently coming from your own site.

It's easy enough to tell, just execute your drush --version in a directory outside your project:

$ ddev exec -d /tmp drush --version
 Drush Version   :  8.1.18
rfay
  • 9,963
  • 1
  • 47
  • 89