20 $this->setName(
'install')
21 ->setDescription(
'Install Elgg using a configuration file or interactive questions')
22 ->addOption(
'config',
'c', InputOption::VALUE_OPTIONAL,
23 'Path to php file that returns an array with installation configuration' 25 ->addOption(
'no-plugins', null, InputOption::VALUE_NONE,
26 'Prevents activation of bundled plugins' 45 'displayname' =>
'Administrator',
46 'username' => $this->
ask(
'Enter admin username: ',
'admin'),
47 'password' => $this->
ask(
'Enter admin password: ', null,
true),
48 'email' =>
$email = $this->
ask(
'Enter admin email: '),
52 'dbhost' => $this->
ask(
'Enter database host: ',
'localhost'),
53 'dbport' => $this->
ask(
'Enter database port: ',
'3306'),
54 'dbuser' => $this->
ask(
'Enter database username: '),
55 'dbpassword' => $this->
ask(
'Enter database password: ', null,
true),
56 'dbname' => $this->
ask(
'Enter database name: '),
57 'dbprefix' => $this->
ask(
'Enter database prefix (for example: elgg_): ',
'',
false,
false),
61 'sitename' => $this->
ask(
'Enter site name: '),
62 'siteemail' => $this->
ask(
'Enter site email: ',
$email),
63 'wwwroot' => $this->
ask(
'Enter site URL (including protocol http|https and a trailing /): '),
64 'dataroot' => $this->
ask(
'Enter data directory path: '),
69 if ($this->
option(
'no-plugins')) {
70 $params[
'activate_plugins'] =
false;
76 $installer->batchInstall(
$params, $htaccess);
88 $this->
notice(
"Elgg {$release} install successful");
elgg_get_release()
Get the current Elgg release.
elgg_get_asset_path()
Get the asset cache directory path for this installation, ending with slash.
$params
Saves global plugin settings.
ask($question, $default=null, $hidden=false, $required=true)
Ask a question.
static projectDir()
Returns a directory that points to the project root, where composer is installed. ...
Adds interaction to a console command.
error($message)
Print an error.
$config
Advanced site settings, debugging section.
notice($message)
Print a notce.
Updates the basic settings for the primary site object.
static start()
Start and boot the core.
dumpRegisters()
Dump and output system and error messages.
elgg_get_cache_path()
Get the cache directory path for this installation, ending with slash.
Thrown when there is a major problem with the installation.
elgg_get_site_url()
Get the URL for the current (or specified) site, ending with "/".
elgg-cli install [–config]
elgg_get_data_path()
Get the data directory path for this installation, ending with slash.
execute(InputInterface $input, OutputInterface $output)
{}
option($name)
Returns option value.