Since version 4.9.1, CONTENIDO features an automated setup script. It is a PHP file which is supposed to be run with the CLI interpreter of PHP.
The CLI setup does not support upgrades yet!
In order for the script to work correctly, the working directory has to be the setup/ directory of your CONTENIDO installation.
The script itself has to be called with the php interpreter.
If the script suddenly stops without giving an error message try starting it like this:
This tells PHP to let the script run indefinitely instead of interrupting it after a while.
With a standard installation this will start the interactive setup. The script will ask for necessary configuration options and you will have to enter them.
If you don't enter anything for one of the options, the setup will always use what is in written in the brackets as your answer. In this example, it would use "localhost" as the database host.
However, the script can also read this configuration from a .ini file. The default name for this is "autoinstall.ini". You can also use
to use "file.ini" instead of the default file.
An example configuration file can be found in "autoinstall-example.ini":
Don't forget to delete your setup folder after installing! The .ini file you used for the setup contains sensible information like your sysadmin password and your database passwords!
The autoinstall script can also read settings from an XML instead of an ini file. There is also an example for that called "autoinstall-example.xml":
To use an XML file, just use the "–file" switch. The setup will detect automatically the right file type.
Interactive mode vs. non-interactive mode
Per default, the setup tries to be as interactive as possible and it will ask the users about potential errors or missing configuration values. If this behavior is not wanted (e.g. for some kind of automated setup), you can use
This will disable all interactive features of the script. The configuration will be read from the .ini file (either the "autoinstall.ini" or whatever is given by the "–file" parameter). If some kind of error comes up, the script will terminate (for example if the ini file can't be found or read).
The script can also be forced to use the interactive mode, even though an "autoinstall.ini" is present. This is especially useful if only some of the values need to be changed, since the setup will use whatever is written in the ini file, if nothing is given by the user.
If the autoinstall.php is started without one of those two parameters it will look for the .ini file and use it if it is present. If it is not present it will fall back to the interactive setup process.
Overwriting settings with command line parameters
The script also supports setting options with command line parameters. It uses the same names as the .ini file, so you can use parameters like
and the setup will use "someDatabaseName" as database name and it will only install the modules of the example client.
The setup is capable of deleting the database before installing it. This is especially useful for development purposes. To do that you have to add the right setting to your ini or XML file:
The setup will ask for confirmation before deleting anything, even if the "--non-interactive" parameter is present.
The command line setup is localized. You can choose the language by using the "–locale" parameter:
The locale has to be a valid CONTENIDO locale (meaning it has to exist as a subfolder of contenido/setup/locale).
For a quick overview about the possible parameters and what the script does, you can use
This will display a short summary of the valid parameters.