Fully Automated Magento Install Script

As we're a popular Magento hosting and Magento development company, we find ourselves installing Magento quite a lot throughout the day.

A few years ago we wrote an installation script, but rudely forgot to share it with the community. You can find it here

The features

  • Using the script is really easy
  • Support for CE/EE
  • Supports installation with/without sample data
  • Chooses the correct sample data for the version of Magento you are using
  • Automatically re-indexes after installation
  • Automatically completes the full installer (with en_GB defaults)
  • Automatically creates an admin account
  • Supports CE 1.3/1.4/1.5/1.6 EE 1.10/1.11

Using the installer for Community Edition

First log into your SSH account and execute,

wget -O mage-install.sh https://sys.sonassi.com/mage-install.sh

Then execute the script, it takes a minimum of 5 arguments and 2 optional arguments.

Required arguments 

1. DB Host
2. DB User
3. DB Name
4. DB Pass
5. Magento version

Optional arguments (for auto install)

6. Store URL
7. Admin Email Address

So for a full installation, that automatically installs Magento, adds sample data and completes the final install process, you would run.

mage-install.sh mydbhost myuser mydb "mypass" "1.6.2.0" "www.mystore.com" "info@mystore.com"

Which would show ...

Do you really want to install in /home/mystore/public_html/ [y/N]: y
Do you want to install sample data? [y/N]: y

Starting installation, please wait ...
>> Downloading Magento 1.11 ... Done
>> Downloading sample data ... Done
>> Extracting files ... Done
>> Importing sample data ... Done
>> Setting up Mage ... Done
>> Cleaning up ... Done
>> Installing Magento ... SUCCESS
>> Re-indexing all indexes ... Done
>> Removing admin notifications ... Done

########################################

 INSTALLATION COMPLETE

 Admin Url     : www.mystore.comadmin
 Admin Username: info@mystore.com
 Admin Password: RfvDY-/l

########################################

Using the installer for Enterprise Edition

If you wish to install Magento Enterprise edition - then you'll need to download the tar.gz archive from your "My Account" section on MagentoCommerce.com.

  1. Upload the file to the base directory of where the installation will be.
  2. Rename the tar.gz file to be latest-magento.tar.gz
  3. Continue with the instructions from CE above.