drush runserverfor drush 7x
Runs PHP's 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 127.0.0.1:8888, all elements optional. See examples for shorthand.
-
Options
runserver accepts 5 option/s:
--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). Default is to log in as uid 1.
--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 127.0.0.1, port 8080.
drush rs 8080
Start runserver on 10.0.0.28, port 80.
drush rs 10.0.0.28:80
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.
drush rs --dns localhost:8888/user
Start runserver on default IP/port (127.0.0.1, 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=127.0.0.1:8080/ -
Start runserver on 127.0.0.1, port 9000, and open /admin in browser. Note that you need a colon when you specify port and path, but no IP.
drush rs :9000/admin
-
Comments
comments powered by Disqus