I want to modify a variable (preferably in a Bash Script format) because my PHP environment requires a port number.

To open a browser in Drush, one executes

$ drush uli

In a script:

$ bash-3.2$ VAR='drush uli'; echo ${VAR}; ${VAR}


drush uli

http:/ /website-7-26-2-17-res124725.local/user/reset/1/1393147909/zMiquSr_ikA7xdp7kA3g4CvTGd82mWsVdqEiMCs/login

Can I modify that URL before Drush opens the browser?

Can I stop it from executing and manipulate the URL in a Bash script?


You can create settings.local.php with your development base url:

$base_url = 'http://website-7-26-2-17-res124725.local:8888';  // NO trailing slash!

Drush just uses Drupal's url() function to build user one-time-login link.

  • is there a way to set it via cli or script? like drush vset base_url?
    – Mau
    Feb 26 '14 at 4:14
  • I don't have access to settings.local.php, I need to do it via Drush or Bash Script.
    – Mau
    May 23 '14 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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