Configure-Magento-on-digital-ocean

How to Install Magento on Digital Ocean

As a merchant and as a developer we all know the importance of this platform to create an eStore or a huge eBusiness. Today almost every customer wants to shop online because of the ease to use. To serve them Magento platform was made by eBay.inc.Magento is a manifesto which is build using three main ingredients which are being included in this platform because of the importance and the functionality. These are:

1. PHP Programming language: Obviously to develop any application one must need the programming language. PHP is an open source Programming language which means the in contrast the Magento platform is also open source.

2. MySQL: The database is must need of any of the application. PHP supports MySQL to manage the data of the app.

3. Some parts of the Zend Framework: An open source framework to support the Magento.

In order to make your store available worldwide you need to host it on the live server. Digital Ocean is one of the best Cloud hosting service providers that most of the developer prefer to use because of its efficiency for development purpose.

In this article, I am going to show you how to install Magento 1.x ,the platform that most of the merchants use, on Digital Ocean, one of the best VPS service providers. To do so you must have to follow the steps that are listed below:

Before we Begin…

At this step before you any further into this article you have to cross check the things in the following check list:

– You must have to start a droplet of minimum 1 GB Ram and about 30GB disk. But you can change as per your need according to your development purposes.

– Your server must be installed. You must have Ubuntu, LAMP and phpMyAdmin.

– And you must have to get login in SSH with your DO username and the correct password.

Please Note!! Digital ocean and In my checklist I have all three things checked 😉

Setting up the files and the surroundings

First of all and the most important step is to download the Magento 1.x files and then setting them on your droplet on Digital Ocean. The process of doing so is mentioned below:

1.Download the Files

You really don’t have to download the magento files you can use CLI commands to get the files the command is wget. Obviously everyone wants to use the latest versions because of more included features and the security. To get the files the command is:

cd /var/www/public_html

Wget https://github.com/OpenMage/magento-mirror/archive/magento-1.9.zip

Note that! You have to archive this in your public folder that is your home directory.

2.Extract the Files

Now that you have downloaded the zip file in order to use them you have to extract them. The Command is:

unzip magento-1.9.zip

Pretty easy!!

3.Assigning freehold.

Your home directory now have the Magento 1 files at this stage you have to assign the ownership to the Apache’s user. And to do this you will need the command that is mentioned below:

sudo chown -R www-data:www-data /var/www/public_html/

Ubuntu/Debain

find -type d -exec chmod 775 {} \;

find -type f -exec chmod 664 {} \;

Make Sure!! To take care of R that should be in capital.

As soon as you will run this command the Apache server will allow you to use or modify these commands.

Setting up the MySQL Database

After that you have your magento 1 files in your root directory ready to get use but to use it you first need to setup the database. Why not! Because the database will maintain the data of your online store that is the most important aspect of the store. So let us begin to setup the database first

1. Create database

To continue setting the database you have to login first into the root account using:

mysql -u root -p

Now enter the password that you set on installing MySQL at the time when system will ask. As soon your will enter the correct password you will now be taken to the command prompt. Here you have to create the database.

You can name the database whatever you like it could be of your own choice: the command is:

create database example_db;

Note:  you have to put semicolon (;) at the end of the query.

2. Create the account for the user

The second and the must step in order to set the database for installing Magento 1 on DO you have to create the user account so that the user can login and start using the services of database. Now the best practice is to create a one-function database so that the permissions can be controlled better and wiser.

create user ‘example_user’@’localhost’ identified by ‘example’;

You can name the username and password whatever you like. My username is example_user and the password is example.

Make Sure!! That you use more secure password because security is everything you need.

3. Giving Permissions

After that you have your user account you have to give permission to that user according to your need. To do that the command is:

GRANT ALL PRIVILEGES ON example_db . * TO example_user @localhost;

Here!!  I am granting all of the privileges to the user example_user

4. Flush the Changings

Now the last step is to save all the changes that you have made up till now to do that you have to flush them. To do so the command i9s mentioned below

FLUSH PRIVILEGES;

Exit

After that you have run this command this means that the MySQL will now know about the changes that you have made for the newly created user. After flushing you have to EXIT to continue through the front end of the application to check how to install Magento 1 on the Digital Ocean using front end check out the next heading.

Continue using the App’s Front end

After getting the files and setting up the database you have to continue using the web interface of the Magento 1 on Digital Ocean. To access the front end you have to open up the browser and enter the address in the address bar and hit enter you will be redirected to the Welcome page of the application.

The address can be different according to your domain name

http://server_domain_name/

1.Welcome Page

This is the very first page of installing the Magento 1 on the Digital Ocean. On this page you only have to check the checkbox that ask you to Agree to the terms and conditions and then hit the orange Continue button. The next page is mentioned in the next no.

Digital_Ocean1

2.Localization Page

On this page setup the information according to your own time zone, currency and the language. Now press the Continue button. To make you more clear the snapshot is being included.

Digital_Ocean2

3.Configuration Page

This page will ask you about the basic info about the database, the web service and the security session key. The fields are further mentioned below with the required answers.

Configuration option

Database Type: Select the MySQL option because the Magento only supports this type of database.

Host: Put the name of your host

Database Name: The database name that you already had set when creating the database at the time of setting up the files on Magento 1 on the Digital ocean droplet.

Username: The Username will be that name that you had already set when you created the user account.

User password: And the last option of the first section will be password that you have to enter the same as you set during the configuration of the user account.

Table Prefix: this field is optional. If you want to enter any value here you can do that if not then leave it blank.

In the second section you have to make sure to:

Base URL: to set this value as it will be your domain name. Else you can use the public IP for the time being.

Admin Panel: you have to put the admin path that is used by the admin to enter the admin panel.

Enable Charts: this option is up to you, you can Enable or Disable it. This will only depend on you if you want to display charts on dashboard then you have to enable it else the other option have to be selected.

Save Session Data In:  you have to select any of the option. I will explain both of them. If you choose File System that means the data will be stored in the file system which is quiet old, unreliable and most easy option but if you choose Database that means the data will be store in the database which is manageable thing.

4.Create Admin Account

Now you have to create the admin account that is used to operate the Magento store. The fields and their possible answers are listed below

First Name and Last Name: Enter the first name and the last name of the admin here.

Email: Email of the admin should be mentioned here

Username: This field is required you must have to enter the username here in order to get login the account to enter the admin dashboard.

Password and Confirm Password: Enter the password that is needed to enter the admin account. The more the secure password the more secure the account will be.

Encryption Key: leave this field blank if you are not migrating your data over an exisiting Magento Installation.

5.Home Page

As soon as you 1 on Digital Ocean you will redirect to the last page that is the Home Page. At this stage you can now enter you public ID in the browser and can see the front end of your store or you can go to the dashboard of the admin panel. The home page should look something like this,

Digital_Ocean4

If you want to go to the dashboard simply login to the account by providing the username and password that you have already set before and then you will be redirected towards the dashboard page.

Digital_Ocean5

Final Thoughts

After you have followed the above steps you have now successfully installed Magento 1 on the Digital Ocean droplet and your store is ready so that visitors can visit and then become your customers permanently give them promotions so that they can refer your store to others.

Still have any question? Or want to give feedback simple use the comment section or you can share it either on Facebook, Twitter or where else you like.

 

Wajid Hussain

Wajid Hussain

Community Manager at Arpatech
Wajid Hussain has a vast experience in Magento and PHP fields. He is currently a Magento Community Manager at Arpatech. He keeps himself engaged with latest e-commerce and Magento trends and also happens to be an avid football fan. You can follow him on Twitter at @wajidstack or contact him through e-mail wajid.hussain[at]arpatech.com
Wajid Hussain

Latest posts by Wajid Hussain (see all)

TALK TO OUR
CLOUD EXPERT

+1 (800) 214-3513
8am - 8pm UTC

Arpatechops - Managed Ecommerce Hosting Solutions
ArpatechOps bring you E-commerce
Managed Hosting and Application
Support services.

FEATURED SERVICE

Social

  • Facebook Linkdedin Twitter