Skip to the content
Documentation

Installation

No ratings yet

This section installs Exponential 6 (the 6.0 line, current release 6.0.15) from an empty server to a working site. It covers the requirements, the quick install with Composer, the setup wizard in the browser, the kickstarter, the web server, permissions and cron, the first sign-in and how to check the result. Every command here was checked against the 6.0.15 console.

The earlier pages of this section were written for eZ Publish, the predecessor of Exponential, which its creator discontinued. They remain in each page's version history. Exponential 6 installs differently: with Composer, one console command or the setup wizard, on SQLite by default, served by Exponential Velocity or by Apache or nginx with PHP-FPM.

Run every command from the installation root, the directory that holds index.php, autoload.php, bin/ and settings/. ./console is a shortcut for php bin/php/console that many installations add (ln -s bin/php/console console). When you run a script as root, add --allow-root-user; the script tells you when it is needed.

Requirements at a glance

Need Exponential 6.0.15
PHP 8.0 to 8.5 supported; 7.4 usable without support. Use the newest PHP your system offers.
PHP extensions dom, libxml, simplexml, xsl, mbstring, iconv, intl, pcre, json, session, zlib, one database extension, and gd or ImageMagick. Recommended: curl, openssl, pcntl, opcache; sockets for Velocity.
Database, in order of preference 1. SQLite 3 (the default, no server) 2. PostgreSQL 3. MongoDB 4. MariaDB 5. Oracle (through the ezoracle extension) 6. MySQL
Web server Exponential Velocity (recommended, installed with Exponential), or Apache or nginx with PHP-FPM, or any server that can rewrite a URL to index.php
Composer 2.x, the current release

The details, with the php.ini settings and the packages per Linux distribution: Requirements.

Quick install with Composer

With PHP and Composer, these commands install a working site on SQLite, without a database server, and serve it with PHP's built-in server for a first look:

composer create-project se7enxweb/exponential exponential
cd exponential
php bin/php/console exp:install --apply --random-password --url=http://localhost:8087
php bin/php/console exp:velocity start --engine=php

Open http://localhost:8087/site/ for the site and http://localhost:8087/admin/user/login for the administration. The user is admin; the password is printed once at the end of the install and written to var/log/initial-admin-password. Stop the server with php bin/php/console exp:velocity stop --engine=php.

Without --apply, exp:install is a dry run: it checks the database and the packages and installs nothing. Add a version to pin a release, for example composer create-project se7enxweb/exponential:v6.0.14 exponential. The php engine is for development only; a real site uses Velocity or a web server (below). The full walk-through, with every option: Normal installation.

Three ways to install

All three run the same setup steps and produce the same installation.

  Console install Setup wizard Kickstarter
Started by php bin/php/console exp:install --apply opening the site in a browser php bin/php/console exp:kickstarter run --apply
Answers come from command-line options, each with a default forms, one page per step kickstart.ini in the installation root
Web server needed during the install no yes no
Dry run the default; --print shows the configuration no the default (run without --apply)
Best for the fastest install, scripts and CI a first install, trying Exponential repeatable and unattended installs
Read more Normal installation The setup wizard Automated installation

To build websites rather than only run one, get the code as Git clones with their history first: Manual installation.

Serve the site

The document root is always the installation root.

  • Exponential Velocity (recommended for every stage): an application server installed with Exponential that serves HTTP and HTTPS itself, with no Apache, nginx or PHP-FPM.
  • Apache with PHP-FPM: the rewrite rules ship in .htaccess_root; ./console exp:setup:htaccess --apply copies them to .htaccess.
  • nginx with PHP-FPM, and LiteSpeed, Caddy or IIS: the same rules as server configuration.

Commands and complete examples: Virtual host setup, Virtual host example and htaccess example.

Permissions and cron

The user the web server or the Velocity workers run as must be able to write design, extension, settings (with settings/override and settings/siteaccess) and var with everything below it. The setup wizard's system check prints the exact commands for your machine, of this form:

sudo chmod -R ug+rwx design extension settings var
sudo chown -R <web user>:<web group> design extension settings var

When the command line (cronjobs, the console, Composer) and the web server run as different users, give them a common group that can write the same files.

The cronjobs publish scheduled content, send notifications and newsletters and clean up. Since 6.0.15 every installer (the setup wizard, the kickstarter and exp:install) writes them in its last step into the crontab of the user that owns the installation directory (exp:install --no-crontab prints the lines instead). Show, add or remove that block at any time:

php bin/php/console exp:installcrontab --show
php bin/php/console exp:installcrontab --add --apply

When the installer could not write the crontab, add the block with the second command, or the lines by hand (use your public siteaccess and the same PHP binary as the web server):

*/5 * * * * cd /path/to/installation && php runcronjobs.php -q -s site frequent >> var/log/cron-frequent.log 2>&1
17  * * * * cd /path/to/installation && php runcronjobs.php -q -s site infrequent >> var/log/cron-infrequent.log 2>&1

First sign-in and the administrator password

  1. Open the admin address the installer printed (with the default URL access, /admin/user/login below the site address) and sign in as admin with the password from the install summary or from var/log/initial-admin-password. The setup wizard uses the password you entered on its Site administrator page.
  2. Change the password at once: Change password in the user menu, or /admin/user/password. It must have at least 10 characters and must not be a well-known password.
  3. Delete the password file: rm var/log/initial-admin-password.
  4. Give the administrator a real e-mail address, so a password reset by mail reaches someone.

A lost password is reset on the command line; as root no other sign-in is needed, and -g generates and prints a new password:

php bin/php/resetuserpassword.php -u admin -g --allow-root-user

Check the installation

php bin/php/console --version                # console (Exponential) 6.0.15...
php bin/php/console exp:setup:status         # where .htaccess and config.php come from
php bin/php/console exp:installcrontab --show
curl -s -o /dev/null -w '%{http_code}\n' https://www.example.com/site/          # 200
curl -s -o /dev/null -w '%{http_code}\n' https://www.example.com/.git/config    # 404
tail var/log/error.log

On SQLite, also make sure the database file is never served; this must answer anything but 200:

curl -sI https://www.example.com/var/storage/sqlite3/exponential.db

When a step fails, see Troubleshooting.

The pages in this section

Next steps

In this section

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.