Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

When I run drush user-login username, drush prints a url like http://default/user/reset/1/32323933.... How do I replace default with the actual website name?

share|improve this question
    
Not tried it so posting a quick comment, the variable site_name is used to save the name of the site in Drupal 6, the command drush vget site_name would give out the same, so probably drush vset site_name WHATEVER_NAME_TO_SET should do the work... –  optimusprime619 Dec 25 '12 at 14:27
add comment

1 Answer 1

up vote 7 down vote accepted

You can use option --url:

-l <http://example.com:8888>, URI of the drupal site to use (only needed in multisite environments or when running on an alternate port).
--uri=<http://example.com:8888>

$  drush uli -l yoursite.dev

Or create a record in your aliases.drushrc.php file:

$aliases['yoursite-dev'] = array(
  'root' => '/vhosts/yoursite.dev',
  'uri' => 'yoursite.dev',
);

Now you have an alias @yoursite-dev and can use it:

$ drush use @yoursite-dev
$ drush uli

Update:

Now I prefer to create sites/default/drushrc.php file for each Drupal folder:

<?php
$options['l'] = 'http://yoursite.dev';
$options['r'] = '/vhosts/yoursite.dev';

More info about drushrc.php: https://github.com/drush-ops/drush/blob/master/examples/example.drushrc.php

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.