1. Home
  2. Magento 1 Guides
  3. Install Magento 1.X

Install Magento 1.X

There are several possible ways to install Magento 1.X, the method used depends on your needs. For example, you could deploy an existing code base from a git repository. However, in this article we will cover two methods; installing from an archive and using the tool n98-magerun.

Install from Archive

Follow the steps below to install Magento 1.X from scratch entirely. In our example, we are setting up a site using the domain mojotest.com.

  1. We need a website to install Magento under. Open Mojo Host Manager and select the User your site will be under (Users from the left-hand nav menu then select a user)
  2. Under the Websites area, click the add one link.
  3. A blank form will appear. Fill it out completely with the domain(s) you will be using.
  4. Select and name a web root using the folder icon. Here we have named the document root folder the same as the website for easy identification.
  5. With the form completed, click the yellow Create button in the bottom right to create the website in Mojo Host Manager.
  6. Before Magento can be installed, a database and database user is needed. Click Database from the left-hand nav menu.
  7. Click Add New Database
  8. Enter a name for your database, and click the Create button to save it. Remember the database name for later.
  9. Now we need a database user, click the User tab in the database section to open the Add User form.
  10. Enter a user name.
  11. Set the hostname to localhost. The hostname should always be localhost unless you will be connecting to MYSQL outside of the MageMojo network.
  12. Set or generate a password.
  13. Click Create to add the user.
  14. Add permissions by clicking the Database tab next to the User tab in the database section.
  15. Select the database you just created in Step 8.
  16. To the right, a list of users will be viewable. The colored dot indicates whether a user has privileges to the selected database.  You should see they are all currently red. Click the user created in Step 13 to expand the privileges list.
  17. Click the ALL PRIVILEGES bubble to give this user all rights to your database. In the screenshot below, the database user mojotest_user has been given all privileges to the mojotest_db
  18. Click Update to save your changes.
  19. Now we are ready to install Magento. Download the most recent version of Magento 1.x from the Magento downloads page.  Since the release of Magento 2, you need to go to the Release Archive tab to see the older versions. You can also use the Magento mirror at GitHub https://github.com/OpenMage/magento-mirror/releases. You can use utilities like wget to download Magento directly to the server via the command line/SSH access.
  20. Upload your Magento archive to the document root created as part of the website in Step 5. Uploading files can be done via SSH/SFTP or FTP. In this example, Magento 1.9.2.4 was downloaded from the Magento mirror GitHub repository:

  21. Extract the file. For zip files you can run unzip targetfile.zip or for tar.gz files run tar -zxvf targetfile.tar.gz . From the SSH shell or FTP client, your web root will look like this after extraction.

  22. Now we can begin the install process. Visit your domain in your web browser. You should see the Magento installation wizard:
  23. Agree to the terms and hit Continue.
  24. Update the locale settings as needed. Since we are in the United States, we left everything to default for this example:
  25. Using the database user and database created earlier, fill out the configuration information. The host should be localhost and left to default.  You may add a table prefix if you like, this will prefix the Magento tables (i.e. mage_core_config_data ) Prefixes have no effect other than acting as an organization tool.
  26. Under Web, Access Options set the base URL to your domain. It also recommended you change the admin path from the default to protect against brute force attacks. In the example below, we are setting a site for mojotest.com on the default path. Skip Base URL Validation should be checked if this domain is not pointed to your server yet and you are using host file entries to view it.
  27. Leave the sessions storage set to File System.
  28. Click Continue.
  29. Create an initial admin login; this will be used to get into your Magento backend after installation. The username is entirely up to you. The encryption key can be left blank and be auto-generated.
  30. Click Continue when you have set the admin account information.
  31. The install is complete if you see the You’re All Set screen. Click either link to visit the relevant part of the site.
  32. If everything was installed correctly, the frontend should look like below:

n98-magerun

To say the least, “the n98 magerun CLI tools provides some handy tools to work with Magento from command line.” One of these options is to install Magento. Before running n98-magerun on your server to set up a new site, there is some access you should configure, first.  n98-magerun also requires SSH access to work.

  1. Setup a vhost with a document root where your site will be installed
  2. Create a database
  3. Add a database user and assign privileges
  4. Log into your server via SSH
  5. Navigate to the web root created in Step 1
  6. Run n98-magerun install

  7. Select your preferred version; we will be using option 13 to install 1.9.2.4
  8. Set the installation folder, if you are currently in the webroot, use the period mark (.) to install in the present working directory.
  9. Follow the prompts; there are many options. Most importantly always set the database host to localhost, you can also opt to install sample data easily via n98. The output below shows a standard install without sample data and default options. After all the prompts you will see it start the installation process:

  10. After installation, it should say Installation Successful.  The site will be reindexed and return you to the command prompt:

  11. Visit your site in your web browser; you should see the default Magento store page if your installation worked. Failures would show up in the command line output from n98-magerun
Updated on July 25, 2017

Was this article helpful?

Related Articles