LogoLogo
Homepage
English
English
  • Contributing to the documentation
  • Getting started with PrestaShop 1.7
    • What you need to get started
    • Installing PrestaShop
    • Installing PrestaShop on your computer
    • Installing PrestaShop using the command-line script
    • Uninstalling PrestaShop
    • Misc. information
  • User Guide PrestaShop 1.7
    • Training
    • Customizing your shop
    • Connecting to the PrestaShop back office
    • Discovering the Administration Area
    • First steps with PrestaShop 1.7
    • Selling with PrestaShop
      • Managing your Orders
        • Order list management
        • Order page management
          • Editing an order
          • Creating returns and refunds
        • Creating a back office order
        • Invoices
        • Credit slips
        • Delivery slips
        • Shopping carts
      • Managing your Product Catalog
        • Managing Products
        • Managing Categories
        • Monitoring your Catalog
        • Managing Product Attributes
        • Managing Product Features
        • Managing Brands
        • Managing Suppliers
        • Managing Files
        • Managing Discounts
          • Cart Rules
          • Catalog Price Rules
        • Managing Stock
          • Stock Overview
          • Stock Movements
      • Managing your Customers
        • Your customers
        • Customer addresses
        • Outstanding
      • Managing the Customer Service
        • Customer Service
        • Order Messages
        • Merchandise Returns
      • Understanding your statistics
    • Improving your shop
      • Managing your Modules
        • Modules and Services
          • Module notifications
          • Modules Selection
          • Installed modules
        • Module Catalog
      • Customizing your store design
        • Theme and Logo
        • Theme Catalog
        • Email Theme
        • Pages - Managing Static Content
        • Positions
        • Image Settings
        • Link Widget
      • Managing Shipping
        • Carriers
        • Shipping Preferences
      • Managing Payments
        • Payment Methods
        • Payment Preferences
      • Going International
        • Localization
          • Localization settings
          • Languages
          • Currencies
          • Geolocation
        • Locations
          • Countries
          • Zones
          • States
        • Managing Taxes
          • Taxes
          • Tax Rules
        • Translations
    • Configuring your shop
      • Configuring your Shop Parameters
        • General settings
          • General parameters
          • Maintenance
        • Order Settings
          • Orders preferences
          • Statuses
        • Product Settings
        • Customer Settings
          • Customer Preferences
          • Groups
          • Titles
        • Contact
        • Traffic
          • SEO and URLs
          • Search Engines
          • Referrers
        • Search
          • Search parameters
          • Tags
      • Configuring Advanced Parameters
        • Information
        • Performance
        • Administration
        • Email
        • Import
        • Team
          • Employees
          • Profiles
          • Permissions
        • Database
          • SQL Manager
          • Database Backup
        • Logs
        • Webservice
        • Multistore
        • Experimental features
    • Managing multiple stores
      • The multistore interface
        • Adding a new store
        • Adding a new group of stores
        • Setting a store's URL
      • Sample Usages and Specifics
    • Browsing the front office
    • Complying with the GDPR
Powered by GitBook
On this page
  • What is it?
  • How to use it?
  • List of arguments

Was this helpful?

Edit on GitHub
  1. Getting started with PrestaShop 1.7

Installing PrestaShop using the command-line script

PrestaShop also has an installer for command-line installations.

PreviousInstalling PrestaShop on your computerNextUninstalling PrestaShop

Last updated 4 years ago

Was this helpful?

What is it?

This special installer makes it possible to install PrestaShop without the need to use a web browser: simply put the content of the zip archive on your web server, and you can install PrestaShop through your command-line interface (CLI). Any CLI software can be used as long as you can use it to interact with the server's commands: Bash, Windows PowerShell, OS X Terminal, PuTTY, etc.

The point of having a CLI installer in addition to the regular in-browser installer is to give this option to cater for some advanced users, who often prefer command-line interfaces as they tend to provide a more concise and powerful means to control a program or operating system.

How to use it?

The CLI installer is easy to use: from your terminal, go to the /install (or /install-dev) folder (meaning you have previously unzipped the pestashop.zip file), and start the script with this command:

$ php index_cli.php

This will display the various available options.

All the options from the regular in-browser installer are available, with their default value listed. Almost all default values can be left as is, because you can edit them all from the PrestaShop back office once the installation is done. Note that the e-mail and password are the ones used to create the administrator's back office account...

To start the installation, you only need to provide one argument. In reality, you need to provide more:

  • domain. The location where you want your store to appear.

  • db_server. The database server address.

  • db_name. The name of the database you want to use.

  • db_user. The username for the database you want to use.

  • db_password. The password for the database username above.

For instance:

$ php index_cli.php --domain=example.com --db_server=sql.example.com --db_name=prestashop --db_user=root --db_password=123456789

If you also set the --email value to your own address, a recap e-mail will be sent to you once the installation is done.

List of arguments

Here is the list of arguments for index_cli.php as of version 1.6:

Name

Default setting

Description

--step

process

--language

en

language iso code

--timezone

localhost

--domain

localhost

--db_server

localhost

--db_user

root

--db_password

(blank)

--db_name

prestashop

--db_clear

1 (true)

Drop existing tables

--db_create

0 (false)

Create the database if it does not exist yet

--prefix

ps_

--engine

InnoDB

InnoDB/MyISAM

--name

PrestaShop

Name of the shop

--activity

0

--country

fr

--firstname

John

--lastname

Doe

--password

0123456789

--email

--license

0 (false)

Show PrestaShop's license

--newsletter

1 (true)

Subscribe administrator to PrestaShop's newsletter

--send_email

1 (true)

Send an email to the administrator after installation

--all_languages

0 (false)

Install all the existing languages on the shop

--ssl

0 (false)

(From PS 1.7.4) Enable HTTPS on the shop

pub@prestashop.com