Tech Search
9 Must Know Commands With Drush Or My Favorite Ways to Use Drush With Drupal
Do you use Drush and Drupal? Then you may want to read this:
What are your favorite/most used commands with Drush, an open source command line utility that we recommend using to build and maintain your Drupal website. Here is our top 9 most used commands on how to use Drush with Drupal, an open source Content Management System (CMS). This is too good of a list to not share with the community.
Drush is by far my favorite tool when it comes to working with Drupal. While grapical tools are often easier to use initially, command-line tools more often give you more power and control, the drush project is an active Drupal project with a major release (3.x) in the works. While it does change some of the basic command names, it organizes and restructures the design to make it easier to extend. The new release also introduces new features/commands, some of which were prior add-ons.
My Favorite/Most Used Commands
Drush provides a number of commands that permit you do perform drupal installation, maintenance, and status operations. Among my most frequently used commands/operations:
1. View the update status of modules
2. Update site modules
3. Clearing caches
4. Download drush modules
5. Enabling modules
6. Disabling modules
7. Download drush to create a new installation
8. Get the list of enabled (disabled) modules
9. Get the list of and status of a specific module
In v2.x, I would do this by:
1. drush -n update
2. drush update
3. drush clear cache
4. drush download m1 m2 m3
5. drush enable m1 m2 m3 (I often use the -y option in order to skip the confirmation)
6. drush disable m1 m2 m3 (I often use the -y option in order to skip the confirmation)
7. drush download (followed by renaming the drupal-N.nn directory to a more meaningful name)
8. drush statusmodule | grep 'Enabled' (or 'Disabled')
9. drush statusmodule | grep 'my guess at module name'
Now, with the formal release of v3.x. The revised commands for the above are:
1. drush -n pm-update
2. drush pm-update
3. drush cache-clear all (all, theme, menu, css+js are the available options)
4. drush pm-download m1 m2 m3
5. drush pm-enable m1 m2 m3
6. drush pm-disable m1 m2 m3
7. drush pm-download --drupal-project-rename=my.sitename drupal
8. drush pm-list --type=module --status=enabled
9. drush pm-list --type=module --package="Package Name" (if you know the exact package name) ordrush pm-list --type=module | grep 'part of package name or module name' (if you are not sure of a package or module name)
Our blog has more info that includes steps on how to use each of these commands in Drush 2.x and Drush 3.x.
George B. Stevens is President and CEO of Guidelight Business Solutions, an Austin-based web design and development firm focused on delivering exceptional solutions through Innovation from Software and Science.™ For more technology tips and insights, check out the Guidelight Business Solutions blog at http://www.guidelightsolutions.com/blog.
Article Source: http://EzineArticles.com/?expert=George_B._Stevens
| < Prev | Next > |
|---|