Drush: What You Should Know

Sep
01

We never get tired of speaking about the benefits and distinctive features of Drupal. This time we will cover Drush as something you should definitely try to make your web-development life a lot easier.

Drupal is a CMF that has infinite possibilities and meets your needs in every way possible. It has everything, including the most useful modules and a huge variety of tools.

But to really be able to take advantage of everything it offers, you should also know what Drush is and how to work with it.

So we are glad to offer you a quick Drush review for beginners.

What is Drush?

Drush (stands for Drupal shell) — is a command line shell for doing different administrative tasks without having to open a web browser. With it, you can manage Drupal right from your server command line.

What it is used for?

Drush has a lot of functions. It’s used to clear caches, install and uninstall modules, update Drupal core, sync databases between environments etc.

Using a Drupal shell makes the process of web development much easier and faster, as it automatizes everything and cuts the time for tasks in half. For example, the entire Drupal core can be updated in 20 seconds and all the backup done, without you having to control the process. How cool is that?

Drush is a utility that was created specifically so that you didn’t have to deal with user interface. But still it has its own extension to automatize everything that’s left. It’s called Drush Fetcher. It can create databases for sites, update permissions and do all the repetitive work that you usually have to do creating a site.

How to use?

All you have to do is to install the utility and learn some commands. Here are a few of our favorites.

  • drush cache-clear (cc) — clears all cache (well, duh)
  • drush pm-enable cck views — enables specified modules
  • drush pm-disable cck views — disables specified modules
  • drush pm-update — updates everything (all the modules and Drupal core)
  • drush status (st) — this one will show the information about your Drupal site (version, URL, database location etc)
  • drush pm-list (pml) — shows all the themes and modules that are available particularly for your website
  • drush pm-download (dl) — downloads a theme or module which name you add after the command itself (rather helpful if you’re being lazy and don’t feel like going to drupal.org and search there).

Those were the general commands. Now, here are some that deal with the users of your site.

  • drush user-create username —mail="email@example.com" —password="password" — this one will create a user
  • drush user-cancel username —  this command will delete a user
  • drush user-password admin —password="new_pass" — this one  will change your password. or someone’s.

Drush: cool or not?

We’ve shared some characteristics of Drush with you and did our best to clarify what it is and what it is really used for. We’ve come to the conclusion that Drupal shell can actually be very useful when it comes to web development. So, considering everything, Drush seems pretty cool to us! What do you think?

Recent Posts

29
Aug
New Mobile Improvements in Drupal 8

We continue our series on Drupal 8. This time we will discuss its mobile first improvements.

25
Aug
The Permissions By Term Module

A lot has been already said about Drupal 8 modules, always something more to say about good stuff.

About us and this blog

 
Request a free quote
Our friendly Help Team can be reached Monday through Friday, from 9am to 6pm, Eastern European Time Zone.

Contact now

Get new blog posts by email: