drush

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
This group should probably have more organizers. See documentation on this recommendation.

Drush is a shell-based application used to control, manipulate, and administer Drupal sites. On the surface, drush is an excellent tool for updating site modules, but here is a more comprehensive list of features for drush:

  • Quick status report (get Drupal site version)
  • Run cron
  • Clear caches
  • Export site databases (SQL dump)
  • Update site code
  • Update Drupal database (run "update.php")
  • Get Info & Download Any Module & Themes
  • Enable/Disable/Uninstall Modules & Thems
  • Simulate updates/commands
  • Sync environments (perfect for DEV-STAGE-PRODUCTION)
  • plus modules offer drush add-ons, like Module Builder, Devel, Hacked!, plus many more.

You can see a list of some Drush commands available.

View the official list of modules that have Drush add-on commands available.


2009 Drush MVP Award goes to "Drush Make"

Arunkarthick's picture

My Drush is not working

When i run drush cc all. I am ending up with ERRO. This drupal is a Vanilla drupal.

PHP Fatal error: Uncaught Error: Call to undefined function cache_get() in /var/www/html/drupal/drupal785/includes/module.inc:754
Stack trace:

0 /var/www/html/drupal/drupal785/includes/module.inc(954): module_implements('system_theme_in...')

1 /var/www/html/drupal/drupal785/modules/system/system.module(2511): module_invoke_all('system_theme_in...')

2 /var/www/html/drupal/drupal785/includes/theme.inc(798): _system_rebuild_theme_data()

Read more
manojthe1's picture

automating stage to prod

Hi all, I have 3 environments 1. dev 2. stage 3. prod.
Content developer is creating/edit/update/delete content in dev. As soon as he done he will move content from dev to stage. In stage content approver will approve it.

As soon as content approver-- approves it I want to move this approved content to prod.

I want to do this automation( stage to prod). is their any module which does this?
suggestions plz

Read more
greggles's picture

New feature in paranoia module: sanitizing db tables based on a whitelist approach

Hi,

I'm excited to announce a new feature in the paranoia module: database sanitizing based on a whitelist.

The main way to sanitize databases now is drush sql-sanitize which works on a blocklist approach. If you add a module or table to your site that stores data in the database that you want to clean up then you must actively add a hook_drush_sql_sync_sanitize that will declare the right command, but it doesn't say if it has cleaned up all the columns in the table.

Read more
joshk's picture

Drush 7 Release Planning

Greg Anderson has posted a master GitHub issue to start pulling in dependencies, must-fix bugs, and high value features that break backwards compatibility in order to get a Drush 7 stable release done:

https://github.com/drush-ops/drush/issues/1123

I think the discussion should be on that thread, but thought people here might like the heads up. Now's the time to advocate for what you'd like to see in the next major release!

Read more
btopro's picture

Drush Recipes format

I looked around for something to do this but couldn't find anything so I started working on a format that will allow for the structured packaging of a series of drush calls. These digestible calls can be chained together or reference each other to form a type of recipe much like chef does; just specific to drush.

Read more
btopro's picture

Using DSLM as an alternative to core Multi-site

I just wanted to point to this write up and screencast I did here about migrating from multiple multi-sites to a DSLM (https://drupal.org/project/dslm) based method of structuring Drupal core / contrib / install profiles. I had been looking for a solution like this for some time and have been very happy with it thus far both as a developer as well as server performance.

https://drupal.psu.edu/content/dslm-multi-sites-steroids

Read more
jdonson's picture

Free Training For Drupal, Git and Github

Start: 
2013-03-12 18:00 - 20:00 America/New_York
Organizers: 
Event type: 
Training (free or commercial)

Learn about the basics of the Drupal world:

  1. drupal.org

  2. git and github

  3. theming for Drupal 7

  4. modules for Drupal 7

  5. Drupal 8 previews

This is for ALL technical and non-technical folks who want to learn about the greatest stack for web dev.

Read more
404's picture

How to mark a module so drush/drupal won't upgrade it

How to mark a module so drush won't upgrade it? In other words, there's a module I want to keep it at a fixed version, I don't want drupal to check updated version for that module. So I can use drush up --no-core without worrying that module would be upgraded.

I tired to change the module.info, change the project name, the timestamp date, didn' t work.

Read more
densolis's picture

To multi-site or not to mult-site - that is the question.

I've recently started learning about how to setup a multi-site drupal web page.

I am working on a web site for a national veterans organization. The question has come us asking if the different states can be part of the site. The national site name would be SOA.COM. The Florida State site would be either FL.SOA.COM or SOA.COM/FL - probably the first.

At this point, I do not have a question about how to set it up, but the practicality of this approach.

Read more
ozozgur's picture

Drush seems to update modules but don't

Hi,
I am using my shared hosting for hosting a Drupal site.
I installed drush. It seems to work.
I type: drush up
It shows me which modules needs update and I type y.
It says it updated them.
But if I type drush up again. I see that they are not updated (they are again listed as to be updated).
any clues?

I am using openpublish distribution.
Thanks
Ozgur

Read more
densolis's picture

How to manually upgrade to Drush 5.x and 6.x on Windows XP and 7

Originally, this article was entitled "How to make Windows' Drush Make command work in Drush 5.7" but it has evolved into "How to manually upgrade Drush on Windows XP and 7".

The Drush Make command does not work in Windows 7 / Vista, when using Drush release 5.5, 5.6, or 5.7. There is a Drush 5.8 windows installer, which fixes the make issue. However, if you want to upgrade to drush 5.9 or 6.0, there are no installers for them. No worries. This article will provides instructions for manually installing the latest version of Drush in Windows.

Read more
anilbhatt's picture

Take Backup, Install Automatic update locally and commit changes to remote server

I would like to discuss my problem with you folks.

I want following the tasks to be automate with my local machine drush or shell script :-

1) Take a svn / git checkout of my remote server to my local machine.
2) Take backup of database and code-base.
3) Install the drupal updates of core and contributed module in local machine.
4) if #3 is successful then commit the changes to git or svn.
5) Make a SQL query file which contains list of SQL Queries those we ran with #3 at local machine.

Read more
densolis's picture

Installing Drush on Win 7 so it runs in a Git Bash Window

All,

I noticed that quite a few people in the Drupal Easy Career Starter Program could not get drush to work in their git bash windows.

This is because the software was not installed with the correct option! When you install drush using the Drush 5.7 Windows Installer, the attached screen will appear.

If you notice, there are three boxes that are "X" out. The second box / line is titled "Register Environmental Variables". You should un "X" this box. When you click on this box, you will receive a drop down menu. Choose "Will be installed on local hard drive".

Read more
lhridley's picture

Error: "env: drush\r No such file or directory" when trying to run an install script

I wrote an install script to set up a sandbox site on my local machine using a drush make file and some scripted commands.

The gist of the script is:

<

pre>

!/usr/bin/env drush

$a = drush_get_arguments();
$current_directory = getcwd();
$profiles = substr($a[1], 0, strlen($a[1])-15) . 'standard.make';
if(file_exists($current_directory . '/installsettings.php')) {
require_once($current_directory . '/installsettings.php');
}
drush_print("Time to prepare our site install...");

if(!file_exists('logs')) {
drush_op_system('mkdir logs');
}

if(!file_exists('public_html')) {

Read more
Kgaut's picture

In a custom command, how to get site alias?

Hi,

I'm trying to write my own drush command, and I want to get the drush alias used within the command.

for example if the user type :
drush @mysite mycommand option

in drush_mycommand, how to get "@mysite" ?

Thanks.

Read more
socialtalker's picture

module availabilty on drush

i am using aegir/BOA which uses drush. i dont understand how it works just yet, but i needed a question answered.
are all drupal modules able to be installed and enable using drush? i read something to the effect that wasnt the case. i get easily confused on drush issues. thanks.

Read more
joelcollinsdc's picture

Drush make: best way of staying up to date with an install profile under development

Here is my current workflow:
1) download an install profile (i'm trying out openpublic) from git.
2) modify the distro.make (its called something else in OP) so you can build from your local repo.
3) drush make to a folder called build with the --working-copy flag
4) install drupal, do work, make changes to code as well as openpublic.make (for module changes and such)
Now, here comes the crappy part...
5) rebuild with drush make to take advantages of the new modules you added to the openpublic.make file
6) copy in your sites folder to the newly build folder
7) continue working

Read more
wipeout_dude's picture

Drush Make : Pulling in a local profile archive??

Hi All,

I am sure this is simple but I can't seem to crack it..

I have created a custom installation profile that includes a .make file.. I have archived the profile so now have a tar.gz file..

I now want to create a complete distribution including the custom profile..

My make file to create the build is as below.. (obviously it doesn't work because I don't know the correct syntax for pulling in a local file)

#

core = 7.x

api = 2
projects[] = drupal

projects[custom][type] = profile
projects[custom][download][type] = file

Read more
Mark_L6n's picture

drush sql-sync error: Lost connection to MySQL server at 'reading initial communication packet'

I've got a new Managed VPS, and am trying to get a Drupal site put there with drush rsync and sql-sync. However, I'm getting the following error from drush sql-sync, following the 2nd time you enter a password:
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0

Does anyone know what this could be related to?

Read more
cossovich's picture

Installing Drush using Git

I recently put together a short screencast demonstrating how to install drush on a local development machine (running Ubuntu 11.10) using Git. It shows some of the benefits to installing drush this way (easy updates, version management etc).

Link to video: http://www.youtube.com/watch?v=fOyAWP8COGE

Is anyone else using Git in this way for drush or drush_make installs?

Read more
Subscribe with RSS Syndicate content