I haven't updated drush in awhile and looking to update it to the latest. I'm not exactly sure how it was installed originally. But when I do a which drush, it shows it resides in /usr/bin/drush

When I do a drush dl drush - I only get the option to upgrade to 7.x only.

How can I update it to Drush 9?

Can I just do a git clone of the drush repo from: https://github.com/drush-ops/drush

Then do I just do a checkout of the drush 9 tag? But how do I make it the default drush application to run? Or do I just overwrite the file in /usr/bin/drush?

FYI: My linux server admin skills aren't up to par.

有帮助吗?

解决方案

drush dl drush downloads the obsolete version of Drush from drupal.org. Drush was never intended to be used to download Drush via the pm-download command, even when it was hosted on drupal.org; the fact that this works is more of an anomaly or coincidence than design.

To update to a newer Drush, follow the usual instructions in the Drush documentation. Since you already have Drush in usr/bin/drush, use this location instead of the location stipulated in the docs (usr/local/bin/drush).

wget http://files.drush.org/drush.phar
chmod +x drush.phar
sudo mv drush.phar /usr/bin/drush

The Drush at files.drush.org/drush.phar is always the most recent stable version of Drush. To download a specific version, visit https://github.com/drush-ops/drush/releases. There is a phar available with every release of Drush from version 8 and later. You can, of course, replace your /usr/bin/drush at any time that you need to upgrade.

许可以下: CC-BY-SA归因
scroll top