1

I have now found two instances where it seems I will finally need to learn how to install and use drush for my new drupal 8 site. I've been avoiding drush the last 5 years working with drupal 7 because I couldn't find a clear tutorial on how to download, install and run (or even how or where to dl, install and run) drush.

For the record - the two use cases I seem to need drush for are:

  • running a migration command to import the csv I've already prepared with content I exported from a wordpress site. I'm trying to use the migrate Migrate Source CSV and the example listed on github.
  • running the command entity-updates per the mismatched entity question I posted.

So, I've now plunged back into trying to suss drush out, and I have some questions with my understanding thus far. My knowledge has been limited to logging into my host server to use cpanel (file manager, backups) and using the filezilla ftp client.

According to [this tutorial by digitalocean][4] I need to install LAMP stack and pear. This is the first point of confusion.

  1. Is this still the correct method for drupal 8?
  2. How do I install LAMP on my server - I'm using a Bluehost dedicated server, so it should already have Linux Apache MySQL PHP, correct? Or is this an application of some kind for those components I'm already using on my server to run my sites?
  3. How do I install pear? From the command line I can access through my cpanel?

Then, trying to follow this Toronto Website Developer by Peter Yaworski tutorial it seems I also need composer?

  1. Do I need to install the composer module?
  2. Or do I install the [full composer here][7] - and do I install it to my server via cpanel command line as well?

That's about as far as my spaghetti understanding goes as to how what is needed to actually get drush up and running as a command line I can use. Oh, and finally, when I see videos or examples of people using drush, I assume they're running it from their server unless they have a local drupal install, correct?

Thanks in advance for any clarification - can't help but feel I'm in over my head here.

  • 2
    I've been avoiding drush the last 5 years working with drupal 7 because I couldn't find a clear tutorial on how to download, install and run OMG, you're gonna kick yourself once you start using it. – No Sssweat Apr 25 '16 at 6:17
  • Follow this video tutorial Installing Drush for Drupal 8 with Composer, monkey see monkey do. – No Sssweat Apr 25 '16 at 6:27
  • once Drush is installed, make sure in your console, you're in the Drupal directory before doing any drush commands. ie: drush cc all (clears all the caches) – No Sssweat Apr 25 '16 at 6:33
1

Drush is an incredibly helpful tool, you are going to enjoy it. There are a lot of other benifits you'll get from installing it as well.

I'm going to assume you are on a Mac.(There are other ways to do this on a Windows machine, but you'll have to look for them.)

  1. Drush installation is independent of your Drupal version. The only variable is which version of Drush you install. This shows that you'll want version 8.x for Drupal 8.
  2. Yes, your Bluehost server already has Linux, Apache, PHP & MySql. The LAMP stack that is referred to in the digital ocean tutorial is one that you install on your home computer. This will allow you to work locally much faster than making changes locally, uploading them to your Bluehost server and seeing if they worked. I'd recommend using homebrew to set it up. Here's a great article to help you out.
  3. Here's some info on installing pear on your Bluehost server.

As for the other questions...

  1. No, you don't need the composer module. (I haven't used it & I've been using drush for years. I'm not dissing the module, I just know it isn't needed.)
  2. Try this go to see how to install composer. This will tell you how to install Composer on both your

You haven't specifically asked about this but I hope you take the time to install LAMP on your home computer. It'll be a hassle but end up in a huge leap in your productivity. BTW You can also use homebrew to install drush. Here's a Drupal article that explains how.

Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.