Skip to content

runserver

Runs PHP's built-in http server for development.

Runs PHP's built-in http server for development. Don't use this for production, it is neither scalable nor secure for this use. If you run multiple servers simultaneously, you will need to assign each a unique port. Use Ctrl-C or equivalent to stop the server when complete.

Examples

  • runserver 8080
  • runserver 10.0.0.28:80
  • runserver [::1]:80
  • runserver --dns localhost:8888/user
  • runserver /
  • runserver :9000/admin
  • runserver --quiet runserver

Arguments

  • [uri]. IP address and port number to bind to and path to open in web browser. Format is addr:port/path. Only opens a browser if a path is specified.

Options

  • --default-server=DEFAULT-SERVER. A default addr:port/path to use for any values not specified as an argument.
  • --browser. Open the URL in the default browser. Use --no-browser to avoid opening a browser. [default: 1]
  • --no-browser. Negate the --browser option.
  • --dns. Resolve hostnames/IPs using DNS/rDNS (if possible) to determine binding IPs and/or human friendly hostnames for URLs and browser.

Global Options

  • -v|vv|vvv, --verbose. Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
  • -y, --yes. Auto-accept the default for all user prompts. Equivalent to --no-interaction.
  • -l, --uri=URI. A base URL for building links and selecting a multi-site. Defaults to https://default.
  • To see all global options, run drush core:global-options.

Aliases

  • rs
  • serve

Legend

  • An argument or option with square brackets is optional.
  • Any default value is listed at end of arg/option description.
  • An ellipsis indicates that an argument accepts multiple values separated by a space.