Installing Magento 1.9 Community Edition from the Command Line
Installing over SSH is quicker and more reliable than uploading thousands of files by FTP. These were the steps for Magento Community Edition 1.9, including sample data. Keep in mind this is now a historical reference: Magento 1 is end-of-life and new projects should start on Magento 2 or Adobe Commerce.
Download, extract and set permissions
wget http://www.magentocommerce.com/index.php/getmagento/1.9.1.0/magento-1.9.1.0.tar.gz wget http://www.magentocommerce.com/downloads/assets/1.9.0.0/magento-sample-data-1.9.0.0.tar.gz tar xvf magento-1.9.1.0.tar.gz tar xvf magento-sample-data-1.9.0.0.tar.gz mv magento-sample-data-1.9.0.0/media/* magento/media/ mv magento-sample-data-1.9.0.0/magento_sample_data_for_1.9.0.0.sql magento/data.sql mv magento/* magento/.htaccess . mysql -h DBHOST -u DBUSER -pDBPASS DBNAME < data.sql rm -rf *.sample magento/ magento-sample-data-1.9.0.0/ rm -rf magento-1.9.1.0.tar.gz magento-sample-data-1.9.0.0.tar.gz data.sql /* Wihtout Sample Data */ wget http://www.magentocommerce.com/index.php/getmagento/1.9.1.0/magento-1.9.1.0.tar.gz tar xvf magento-1.9.1.0.tar.gz mv magento/* magento/.htaccess . rm -rf *.sample magento/ magento-1.9.1.0.tar.gz
Once the files are in place, create a database and user, then complete the web installer in your browser. Import the sample data before running the installer if you want demo products.
Heads up: this guide applies to Magento 1, which stopped receiving official security updates in June 2020. If your store still runs it, plan a move to Magento 2 or Adobe Commerce soon. We can help with the migration.
Stuck on something similar? Our Magento development team is happy to take a look.