I've been a developer at OpenSourcery for over a year and a half now. Working with a team of developers in the office has definitely expanded my skills, and exposed me to tons of tips and shortcuts that I probably wouldn't have heard about otherwise. I wanted to compile these in a public way to get the word out! Pick out some useful ones and get it set up... a few minutes now will save you tons of time down the road, especially for those who spend hours at the command line every day. I've compiled these from many sources around the web. These are just the commands I find myself using a lot.
The post here assumes you've at least heard of Drush. If not, read up.
Drush
Site aliases - these are invaluable. When you set up a new project, add an alias that points to the drupal document root. These aliases live in your home directory in the .drush folder in a file called aliases.drushrc.php. Read up on it here.
Display the currently active site alias in the command prompt - This is very handy. I've pulled stuff from msonnabaum's and adamdicarlo's dotfiles to get some great status info in my command line prompt, including the currently active drush alias, as well as the currently active git branch. The sicle and hammer is pretty great in Mark's, too. I put a sun in mine (۞).
Drush conf - this is a great little utility, especially combined with the aforementioned Drush aliases. Let's say I want to bring up the settings.php file for any given site running on my laptop. I type "drush use @mysite" to set the drush alias. Then I type "drush conf" which prompts me to select from a list of configuration files for that site, including settings.php, .htaccess. It also can be used to edit your php.ini file or aliases.drushrc.php file.
One-time login links - use the command "drush uli [username]" to get a one-time login link for that user account. You can then paste it into your browser and surf the site as that user. This is great for Q/A, or reproducing an issue that's only reported by certain people, without having to reset their password.
Well... I was going to cover a lot more here, but it's time to go home! I promise, I'll continue with some more blog posts in future weeks. Topics yet to cover: Git, Chrome, Terminal, Shell aliases, SSH aliases, DrupalCS, Vim and Sublime2
If you're searching for
If you're searching for "great for Q/A, or reproducing an issue that's only reported by certain people, without having to reset their password" then you'll probably like the Masquerade module http://drupal.org/project/masquerade
Log in as any Drupal user without knowing their passwords.
Great post
Thanks for sharing. Everybody should give away their tips&tricks
And Pieter, Masquerade is a must! It has saved my ass in several occasions.
Keep It Coming
I agree with D Corbacho "thanks for sharing" I am looking forward to more.
Drush conf
Everything seems very logical how and why these tips work - except for Drush conf - I can't find much documentation and have no idea why I would use it. Is it just a quick way to edit a file? A little more detail about use cases would be great.
When I try the to use it Cancel is automatically chosen.
Exactly
It's just a shortcut. I keep a lot of variables in the settings.php file for a lot of projects I use on my laptop. Like whether or not css aggregation or page caching is turned on. Drush conf is a quick way of opening this file. Sublime2 has a great shortcut too (if that project happens to be open), but I'll get into that in a future week. Not sure why cancel is getting selected automatically for you.
These are great, thanks for
These are great, thanks for sharing. I know I definitely don't use drush enough - the tip on the user url is awesome. I usually just end up enabling the devel module to switch users, only providing access to it to the administrator. Definitely not the best way to go so really appreciate hearing about this.
-john
Great tips
I never new `drush conf` and `drush uli [username]` existed. So handy.
Looking forward to your next post.