What is Drush?
Drush is a command line shell and scripting interface for Drupal. It lets you download, uninstall, enable, and update modules, themes, and profiles, as well as execute SQL queries and create and migrate databases. It will also run utilities, such as clear cache. You can find support via Drupal Answers or the Github Drush Issue Queue
Drush project describes this application as a command line shell and scripting interface for Drupal. The name is a portmanteau of 'Drupal' and 'shell'. Drush is supported in Unix, Mac OS X, and Windows operating systems. You can eliminate extra steps, such as navigating in a browser, by typing simple commands instead. In addition to running Drush from a command line, you may also run it from a script.
Core Drush commands let you:
- Back up data into a single file
- Quickly download and install Drupal
- Check current Drupal status
- Flush all images
- Run php scripts
- List all queues (and run specific ones)
- Run tests
- Apply database updates
- Set, delete, or retrieve a variable
User commands let you:
- Add/remove a role to a user account
- Block or unblock a user
- Print user information
- Set or reset user password
Hosting companies who sell Drush hosting plans will install both the app and Drupal for you, and sometimes provide support for Drush. If you already have web hosting, you can install Drush yourself. Be sure to check with your hosting provider to ensure compatibility and gain Shell access. Be sure you fully understand the process and commands before installing Drush. If you aren't sure whether Drush is for you, consult your hosting provider for further details.
Pros and Cons
- Helps you do lots of admin tasks with only a few command
- Replaces the need for lots of clicks and UI refreshes
- Gives you a quick overview of your working site
- Excellent support network via GitHub
- Requires you to be pretty comfortable with the command line
- It's difficult (especially compared to competitors) to pass off small tasks to non-tech savvy personnel
- Only runs on Drupal
How to install
There are a couple different ways to install Drush. One way is to simply run the composer.jsm file. Another way is to install one Drush for all your projects, via composer globally install, and still other options include a git clone install or a Windows Zip package. However, the last of these still has limited functionality, and we recommend you run a virtual machine platform for optimal results.
Points to Remember
Drush is an excellent tool -- if you're happy to be working in command lines and if you're happy in Drupal. However, before you fully hitch your horse to that wagon, You'll want to consider if you have the technical skill required or the site administrator resource available to get in there and fix or change things if (when) they go mildly pear shaped.
The real benefit of Drush is that if you know what you're doing and you're
confident that you know what you're doing, then you can vastly reduce the amount of repetitive action you need to take. However. If you're not that sure, Drush is likely to be a time sink like no other, so some alternatives are worth taking a look at. WordPress the obvious alterative, since it's run on templates and can be run in large part from a GUI rather than a command line shell.
Drush requires at least php 5.2, unless you're using a version older than Drush 3.x (which you're probably not). You'll also need the SSH access (via OSX terminal or Putty, if you're in Windows) as well as PEAR to be on the server, which shouldn't pose any problems.
Are there any major limitations of Drush?
Only that the site admin needs to be extremely comfortable working in a command line shell.
Is Drush compatible with OSX, Windows, and Unix?
It's absolutely compatible with OSX and Unix. However, there is only limited compatibility with Windows. it's generally recommended that you run it through a virtual platform for convenience
What are the requirements for Drush?
You'll need to have at least php 5.2 for Drush 3.x. For Drush 6.x, You'll need php 5.3.3.
Can I personalize Drush commands?
Absolutely! Drush's entire value proposition is that they're faster that GUIs to implement changes. A big part of that is the ability to make up command shortcuts that work and are intuitive for you.
Can I install a specific version of Drush?
Yes, you can. Drush will install the most stable version automatically, but if you want a specific version you can pick and choose. This is a great option if you're installing multiple versions for testing, you are having compatibility problems, or you want the latest version (rather than the most stable).
What do I do if I decide I don't want to use Drush anymore?
No problem. All you do uninstall Drush! it's a single command: pear uninstall drush/drush.
Can I run Drush from a remote server?
You can. There are actually lots of ways to do this, and you can even run Drush from multiple remote servers quickly and easily.
I am trying to run Drush on a remote server, but my server provider is telling me that Drush has conflicts with some other modules that the server is already running. Is this a common problem?
Not so much, but it's not unheard of. The best thing you can do is find out specifically which modules are experiencing the conflict and then go from there.
Here's What Your Drush Hosting Needs To Offer
Drush is a command line interface for administering the Drupal CMS. It goes along with the general philosophy of Drupal in that it is designed for power users. For people who love the Unix command line, Drush will be a joy. For others, it will represent a steep learning curve. In general, it will need to be installed personally. But we recommend SiteGround for Drush hosting.