drush runserverfor drush 6x

Runs a lightweight built in http server for development.

drush runserver

  • Aliases

    runserver has 1 alias/es:

    drush rs

  • Arguments

    runserver accepts 1 argument/s:

    addr:port/path : Host IP address and port number to bind to and path to open in web browser. Format is addr:port/path, default, all elements optional. See examples for shorthand.

  • Options

    runserver accepts 7 option/s:

    --server : Which http server to use - either: "cgi" for a CGI based httpserver (default, requires php 5.3 and php-cgi binary) or "builtin" for php 5.4 built in http server.

    --php-cgi : Name of the php-cgi binary. If it is not on your current $PATH you should include the full path. You can include command line parameters to pass into php-cgi.

    --variables : Key-value array of variables to override in the $conf array for the running site. By default disables drupal_http_request_fails to avoid errors on Windows (which supports only one connection at a time). Comma delimited list of name=value pairs (or array in drushrc).

    --default-server : A default addr:port/path to use for any values not specified as an argument.

    --user : If opening a web browser, automatically log in as this user (user ID or username).

    --browser : If opening a web browser, which browser to user (defaults to operating system default).

    --dns : Resolve hostnames/IPs using DNS/rDNS (if possible) to determine binding IPs and/or human friendly hostnames for URLs and browser.

  • Examples

    Start runserver on, port 8080.

    drush rs 8080

    Start runserver on, port 80.

    drush rs

    Start runserver on IPv6 localhost ::1, port 80.

    drush rs [::1]:80

    Start runserver on localhost (using rDNS to determine binding IP), port 8888, and open /user in browser. Use "php5-cgi" as the php-cgi binary.

    drush rs --php-cgi=php5-cgi --dns localhost:8888/user

    Start runserver on default IP/port (, port 8888), and open / in browser.

    drush rs /

    Use a default (would be specified in your drushrc) that starts runserver on port 8080, and opens a browser to the front page. Set path to a single hyphen path in argument to prevent opening browser for this session.

    drush rs --default-server= -

    Start builtin php 5.4 runserver on, port 9000, and open /admin in browser. Note that you need a colon when you specify port and path, but no IP.

    drush rs --server=builtin :9000/admin

  • Comments

    comments powered by Disqus