Skip to content
Magento 2 Bash Script Installer
Branch: master
Clone or download
Latest commit 9ba948b Jun 14, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Re-structured files Mar 9, 2018
src Make --source optional Jun 14, 2019 Added source options Jun 14, 2019

Simplistic Magento 2 Installer

This bash script helps you to install Magento2 from different sources (tar, composer etc.) with sample data.


You can simply download the script file and give the executable permission.

curl -0 -o
chmod +x

To make it system wide command

sudo mv /usr/local/bin/mage2-installer


mv ~/bin/mage2-installer

Make sure your $HOME/bin folder is in executable path


To display help

./ --help
  • --source options
    • tar (Default)
    • composer

To install Magento CE 2.3.1 (with sample data)

./ --version=2.3.1 --base-url=magento231ce.test --install-sample-data --db-user=root --db-pass=pass --db-name=magento231ce

If --source option is not passed, default tar source is used for downloading.
If you want to install via composer, you can simply use --source=composer option:

./ --source=composer --version=2.3.1 --base-url=magento231ce.test --install-sample-data --db-user=root --db-pass=pass --db-name=magento231ce

To install Magento CE 2.3.1 (without sample data)

./ --version=2.3.1 --base-url=magento231ce.test --db-user=root --db-pass=pass --db-name=magento231ce


After installation, you can create virtual host with this FREE bash script -

sudo ./ --domain=magento231ce.test --app=magento2 --root-dir=/path/to/magento2


Mage2Backup Help Screentshot - Magento2 Installer Help


  • Support multiple compression types (.gz, .zip, .tar.bz2)
  • Option to install Magento 2 Enterprise Edition
  • Option to install via composer
  • Option to install via git clone
  • Option to check system readiness (PHP & it's extensions, MySQL, Nginx/Apache)
  • Option to create virtual host (nginx)
  • Option to create crontab settings
  • Option to migrate with local codebase + database
You can’t perform that action at this time.