Installing Magento 1 on Hypernode
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
Table of contents
- 1 Standard Magento install on every new Hypernode
- 2 Installing Magento 1
Standard Magento install on every new Hypernode
With a new Hypernode comes a standard Magento installation.
The Magento installation is located in the
It is configured to use a database named
YOURAPPNAME_preinstalled_magento and database credentials from the
The Magento admin and database credentials will be emailed 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
We created this file using information from the domain owner. Also, the base URLs have been set to
http://YOURAPPNAME.hypernode.io, 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 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 installation. The default Magento installation is located in the
In order to 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
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 Magento 2 Mode.
This disables the configuration that is only needed for Magento 2. To do this, remove the
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 <database_name>;
After this you exit the MySQL client and write down your database name so you can use it with the installer later.
Installing Magento with n98-magerun
- To install the latest Magento you’ll have to go to your public directory:
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
- Choose which version you wish to install. The first option  the most recent version * of Magento. Press “Enter”.
Insert the installation folder and press ENTER. Magento will now download the files of the installation.
Enter your database credentials:
- database host
- database username
- database password
- database name
- database port
- table prefix
- Press “y” or “n” depending on whether 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 as this might take a while 😉
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
- admin username
- admin password
- admin’s firstname
- admin’s lastname
- admin’s email
- base url
After this, the script will install Magento for you.
When the installation is finished, flush your caches.
When 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.
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 https://raw.githubusercontent.com/netz98/n98-magerun/develop/n98-magerun.phar -O ~/n98-magerun chmod +x ~/n98-magerun ~/n98-magerun install
Move the Magento files to the right folder
If you followed this guide, your Magento files are now located
Move these files to the
/data/web/public directory 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 http://appname.hypernode.io.
Configure Redis as Cache Backend
Follow the steps mentioned in the 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.