Installing PrestaShop via CLI (Command Line Interface) is a fast and flexible way to set up an online store. CLI allows users to execute commands directly without relying on graphical interfaces, making it ideal for experienced users, web developers, and administrators who value automation and time optimization, especially when deploying stores across multiple servers. If you prefer a more standard installation, refer to our article on traditional PrestaShop installation here.
Steps to Install PrestaShop via CLI
Below is a step-by-step guide explaining each command with useful tips.
1. Download PrestaShop
Start by downloading the latest version of PrestaShop. We recommend checking the current version on GitHub.
2. Unzip the downloaded archive
Extract the archive to access all the files.
3. Delete unnecessary files
After unzipping, delete the original archive and some extra files to free up space.
4. Unzip the main PrestaShop files archive
Now, unzip the internal archive containing the core PrestaShop files.
5. Delete the main archive
Since files are now extracted, remove the main archive to save space.
6. Go to the installation folder
Switch to the install
folder to begin the CLI installation.
7. Start the installation via CLI
Using the php index_cli.php
command, specify all installation parameters:
--domain
— your site's URL.--db_server
— the database server, typicallylocalhost
.--db_name
— the database name.--db_user
and--db_password
— database username and password.--prefix
— table prefix, default isps_
.--email
and--password
— admin account credentials.--language
,--timezone
,--country
— language, timezone, and country settings.--ssl
— SSL setting (recommended to enable by using1
).
Example command:
The full list of parameters is available in the official documentation.
8. Return to the root directory
Once the installation is complete, return to the root directory.
9. Delete the installation folder
For security, delete the install
folder as it is no longer needed.
Installing PrestaShop via CLI is an excellent choice for those who value automation. However, keep in mind that not every hosting provider may support this installation method.
Share in the comments if you were aware of the CLI installation method and if you’ve tried it.