Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

I needed to use drush 9.6 and updated that by composer require drush/drush:"^9.6". Thanks drugan!


1

You can pass it in via the --root argument drush status --root=/Users/nicklas/Documents/SourceTree/Drupal/docroot


2

I ran into a similar issue multiple times. I think in all cases cron was running a different version of php. To fix I ended up having to define my php path in my drush call: */5 * * * * /usr/local/bin/php /home/myuser/bin/drush elysia-cron run --root=/home/mysite/public_html --uri=www.mysite.com Also, another thing that helped me debug the issue is by ...


0

Like event said, and In my case, this was solved when the drush cr command is entered before drush cim


3

where is the drush cim command specific documentation? https://drushcommands.com/drush-9x/config/config:import/ Does cim command remove the files after they are imported No. where are the setting files imported from, can you provide me with a path relative to the root (I mean, relative to where the main index.php file of drupal is)? The path to ...


0

Using only drush, you can use php-eval to run this: drush php-eval "cache_clear_all(NULL, 'cache_page');"


0

Get the value of only facebook drush ev '$v=variable_get("social_sharing"); print $v["facebook"]; print PHP_EOL'; Remove google_plus from the list drush ev '$v=variable_get("social_sharing"); unset($v["google_plus"]); variable_set("social_sharing", $v);' Hope this helps


0

In case you use Drupal7, I did drush pm-list --status="enabled" --no-core --fields=name,version > modules.txt while read line; do comp=`echo $line | sed 's/.*(\(.*\))/\1/' - | sed 's/7\.x\-//' - | awk '$1=$1'`; echo \"drupal\/`echo $comp | awk '{ print $1 }'`\"\:\ \"`echo $comp | awk '{ print $2 }'`\"; done < modules.txt You can cut&paste your ...


0

In my case installing drush through composer is what caused the error for me. I also had issues removing it with composer, so in order to get it working I manually removed the following: /vendor/drush/ /vendor/bin/drush After that it worked fine for me.


3

I'm writing this up for posterity, since the Slack is relatively ephemeral. Here's the current method, following Providing custom environment variables to a container: In e.g. .ddev/docker-compose.environment.yml put the following: version: '3.6' services: web: environment: - DRUSH_OPTIONS_URI=http://my.ddev.local Then ddev rm and ddev start ...


2

You have to refer to the dev branch and reference the SHA of the version of dev you want in Composer. Example: composer require drupal/field_group:3.x-dev#COMMITSHA This will fetch the dev branch of version 8.x-3.x at this specific commit. To get that commit itself, you’ll have to find it on the git page for the project ( which now goes to GitLab). I can’...


1

incase someone is trying to add -- to other drush commands you can use: terminus drush site.env -- [drush command here] -- [drush option here] the "--" after the site.env will pass the options to drush instead of terminus. example: terminus drush $SITE_ID -- up -s --security-only


1

If you read the Drupal compatibility table in the docs, you'll see that the correct version for Drupal 7 is Drush 8. The installation instructions for Drush 8 are simple and clear, no Composer required - just download a phar file. PS! If you are planning on maintaining Drupal 8 sites (with Drush 9) too, I recommend getting Drush Launcher.


2

When I run: $ composer create-project drupal-composer/drupal-project:8.x-dev drupal-project-test-site --no-interaction $ cd drupal-project-test-site $ vendor/bin/drush status Then I see: Drupal version : 8.6.13 Site URI : http://default ...


1

Clive's answer is a start, but as TheRealWebGuy notes, there is another step you must take. I was upgrading from drush 8 to drush 9, and my aliases still did not work after running drush site:alias-convert. An additional step that I needed to take for my new alias files to work was to run drush init. I ran it in my user home; I don't know if that matters. ...


-1

We came across the similar issue while upgrading from 8.6.10 to 8.6.13, try deleting the core and then run composer update drupal/core --with-dependencies It should upgrade it to 8.6.13


1

In Drush 9, you download a module with composer require drupal/module_name. See the new documentation for Drush 9 on drush pm:download. After, you will need to enable the module with drush pm:enable module_name. *Other useful commands for modules are: See all the modules installed drush pm:list Uninstall a module drush pm:uninstall module_name


Top 50 recent answers are included