Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. QuickStartCommand.php

function QuickStartCommand::configure

Overrides Command::configure

File

core/lib/Drupal/Core/Command/QuickStartCommand.php, line 28

Class

QuickStartCommand
Installs a Drupal site and starts a webserver for local testing/development.

Namespace

Drupal\Core\Command

Code

protected function configure() {
    $this->setName('quick-start')
        ->setDescription('Installs a Drupal site and runs a web server. This is not meant for production and might be too simple for custom development. It is a quick and easy way to get Drupal running.')
        ->addArgument('install-profile-or-recipe', InputArgument::OPTIONAL, 'Install profile or recipe directory from which to install the site.')
        ->addOption('langcode', NULL, InputOption::VALUE_OPTIONAL, 'The language to install the site in. Defaults to en.', 'en')
        ->addOption('password', NULL, InputOption::VALUE_OPTIONAL, 'Set the administrator password. Defaults to a randomly generated password.')
        ->addOption('site-name', NULL, InputOption::VALUE_OPTIONAL, 'Set the site name. Defaults to Drupal.', 'Drupal')
        ->addOption('host', NULL, InputOption::VALUE_OPTIONAL, 'Provide a host for the server to run on. Defaults to 127.0.0.1.', '127.0.0.1')
        ->addOption('port', NULL, InputOption::VALUE_OPTIONAL, 'Provide a port for the server to run on. Will be determined automatically if none supplied.')
        ->addOption('suppress-login', 's', InputOption::VALUE_NONE, 'Disable opening a login URL in a browser.')
        ->addUsage('demo_umami --langcode fr')
        ->addUsage('standard --site-name QuickInstall --host localhost --port 8080')
        ->addUsage('minimal --host my-site.com --port 80')
        ->addUsage('core/recipes/standard --site-name MyDrupalRecipe');
    parent::configure();
}
RSS feed
Powered by Drupal