Installing Magento 1 on Hypernode

in Magento Tags: MagentoMagento 2Magento2MySQLSSH

Starting over and in need of a fresh Magento 1 installation? Follow the steps in this article.

Do you want to install Magento 2? Installing Magento 2 on Hypernode can be done by following the steps in the article: Installing Magento 2 on Hypernode

Standard Magento install on every new Hypernode

With a new Hypernode comes a standard Magento installation. The default Magento installation is located in the /data/web/public directory. It is configured to use a database named YOURAPPNAME_preinstalled_magento and database credentials from the ~/.my.cnf file. The Magento admin and database credentials will be e-mailed to you when your Hypernode is ready.

We use the tool Magerun to perform the installation. By default, Magerun installs Magento using settings (such as admin details, currency, timezone…) from a ~/.n98-magerun.yaml file. We created this file using information from the domain owner. Also, the base urls have been set to “”, and Redis has been configured as a cache backend. Although not all Magento versions can be downloaded through Magerun, our installation uses the highest Magento-CE version available. We did our best to ensure this installation gets all green lights in our Monitor and new MageReport tool, for example, by hiding the admin access page behind a custom URL.

Optional: Uninstall the default Magento installation

With a new Hypernode comes a standard Magento install. The default Magento installation is located in the /data/web/public directory. In order to uninstall this default Magento installation, run the following command:

n98-magerun --root-dir=/data/web/public uninstall --installationFolder=/data/web/public --force

This will delete the default database (YOURAPPNAME_preinstalled_magento), and recursively delete the /data/web/public directory. Any instances of Magento installed in other directories will not be touched.

More information can be found on our article about deleting your magento installation.

Installing Magento 1

Activate Magento 1 mode

If you used Magento 2 before, and you are now switching back to Magento 1, disable the Magento2 Mode. This disables the configuration that is only needed for Magento 2.

To do this, remove the ~/nginx/magento2.flag:

rm ~/nginx/magento2.flag

Create a new database

The first step should be to create a database. Luckily there is a file where most of the database credentials are already stored: .my.cnf. You connect to your database with the following command:


Create a database by using the next command:

create database DATABASENAME;

After this you exit mysql, write down your database name or add it to the .my.cnf (located in /data/web/) file. Just make sure you can use it later.

Installing Magento with n98-magerun

  1. To install the latest Magento you’ll have to go to your public(cd public) folder. Use the following command to install Magento through n98-magerun:
    php -d memory_limit=1024M /usr/local/bin/n98-magerun install --magentoVersionByName=byte-mag-mirror-latest
  2. Choose which version you wish to install. The first option [1] is the most recent version * of Magento. Press “Enter”.
  3. Insert the installation folder and press ENTER. Magento will now download the files of the installation.
  4. Enter your database credentials:
    • database host
    • database username
    • database password
    • database name
    • database port
    • table prefix
  5. Press “y” or “n” if you want to install sample data. If you told the script you’d like to have some sample data, better grab a cup of coffee or tea. This might take a while 😉
  6. You’re asked to fill in some information to finish the installation. You have to submit the following information:
    • session save
    • admin frontname
    • default currency code
    • locale code
    • timezone
    • admin username
    • admin password
    • admin’s firstname
    • admin’s lastname
    • admin’s email
    • base url
  7. After this, the script will install Magento for you.
  8. When the installation is complete, you’re asked if you want to write the base-url to your .htaccess file, Press “n” and the script will reindex all data in your shop.
  9. The installation is complete. You’re presented with all the checks the script did to ensure Magento was successfully installed on your Hypernode.

NB:If our magerun version doesn’t support the latest version of Magento, you’ll have to install the latest dev version of magerun and use this to install Magento. You use the following commands to get the latest version of magerun and install Magento:

wget -O ~/magerun
chmod +x ~/magerun
~/magerun install

Move the Magento files to the right folder

If you followed this guide, your magento files are now located in /data/web/public/magento . Move these files to the /data/web/public folder and delete the magento folder after this. You can use the following commands to do this:

cd public/magento
mv * ..
mv .htaccess ..
mv .htaccess.sample ..
cd ..
rm -rf magento
rm -rf index.html

Your shop will now be visible through your Hypernode URL.

NB: Nginx doesn’t support .htaccess files but Magento needs them to work properly. That’s why we don’t delete the .htaccess files 😉

Optional: Change your base-url

If for some reason you change your mind about which base-url Magento should listen to, you can use the following commands to change the base-url settings:

n98-magerun config:set web/unsecure/base_url URL
n98-magerun config:set web/secure/base_url URL

NB: Change URL to the url you want Magento to listen on. In case you want to use your appname as a base-url (when you’re still testing) use .

Configure Redis as Cache Backend

Follow the steps mentioned in article Configure Redis to configure Redis as your cache backend.

Optional: configure Lesti::FPC

If you’d like to use Lesti::FPC on Hypernode, please follow the steps mentioned in article Configure Lesti::FPC .