Install eZ Platform on macOS or Windows¶
This page explains how to install eZ Platform on macOS or Windows.
This procedure is for development purposes only. Installing eZ Platform for production purposes is supported only on Linux.
If you want to use eZ Platform in the production environment, see Installing eZ Platform.
Prepare work environment¶
To install eZ Platform, you need a stack with MySQL and PHP. If you want to use a web server, you need to install it as well:
- For Windows: Apache
- For macOS: Apache/nginx
The instructions below assumes you are using Apache.
php.ini file and open it in a text editor.
Provide missing values to relevant parameters, e.g.
Uncomment or add extensions relevant to your project e.g.
opcache extension for PHP (recommended, but not required):
Edit Apache configuration file
Replace placeholder values with corresponding values from your project, e.g.
Uncomment relevant modules. e.g.:
Start Apache using command line:
You can install Apache as a Windows service by running the following command in CMD as administrator:
You can then start it with:
Install Composer using a package manager, for example Homebrew.
Download and run Composer-Setup.exe - it will install the latest Composer version.
Download eZ Platform¶
Alternatively, you can clone the GitHub repository by running:
You can use any other folder name for your project in place of
Set its location as your project root directory in your virtual host configuration.
To install Composer dependencies, from the folder into which you downloaded eZ Platform, run:
After a moment the installer will ask you to provide a few parameters:
- Choose a secret. It should be a random string, made up of at least 32 characters, numbers, and symbols. This is used by Symfony for generating CSRF tokens, encrypting cookies, and for creating signed URIs when using ESI (Edge Side Includes).
- You can accept the default options for
- Select a
database_nameor accept the default one.
- Provide your
The app secret is crucial to the security of your installation. Be careful about how you generate it, and how you store it. Here's one way to generate a 64 characters long, secure random string as your secret, in PHP:
Do not commit the secret to version control systems, or share it with anyone who does not strictly need it. If you have any suspicion that the secret may have been exposed, replace it with a new one. The same goes for other secrets, like database password, Varnish invalidate token, JWT passphrase, etc.
Create a database by running the following command inside MySQL Shell:
Install eZ Platform¶
Before executing the following command, ensure that the user set during
composer install has sufficient permissions.
Install eZ Platform by running:
For eZ Enterprise, use:
Setting up folder permissions and virtual host is installation-specific. Make sure to adapt the instructions below to your specific configuration.
Set up virtual host¶
To set up virtual host, use the template provided with eZ Platform:
<your installation directory>/doc/apache2/vhost.template.
Copy the virtual host template under the name
<your_site_name>.conf into your Apache directory:
- For Windows:
- For macOS:
<your_site_name>.conf to fit it to your installation. Then restart the Apache server.
Set up permissions¶
web/var need to be writable by CLI and web server user.
Future files and directories created by these two users will need to inherit those permissions.
For more information, see Setting up or Fixing File Permissions.
See the Security checklist for a list of security-related issues that you should take care of before going live with a project.