First install composer for all projects(Required User root)
1 2 |
curl -sS https://getcomposer.org/installer | php mv composer.phar /usr/bin/composer |
Then change directory to to the Drupal8 installtion and edit composer.json and add the drush line:
1 2 3 4 5 |
"require": { "composer/installers": "^1.0.21", "wikimedia/composer-merge-plugin": "^1.3.0", "drush/drush": "dev-master" }, |
at the end update compser with: (Required User www-data)
1 |
composer update |
if permissions Problem:
1 2 3 |
sudo chmod www-data.www-data composer.lock sudo chgrp www-data -R * (for the whole drupal8 installation) sudo chmod g+w vendor/* |
clear cache with: (Required User www-data)
1 2 3 |
drush cache-clear or drush cr |
or if you have your own site:
1 2 3 |
drush cache-clear --uri=YOUR-SITE-FLODER-NAME or drush cr --uri=YOUR-SITE-FLODER-NAME |