How to Install OpenCart 2.0 through SSH

by Ahsan Parwez  May 21, 2015

[Update] OpenCart is now available on 1-Click install from within the Cloudways Platform. Simply Signup and launch your OpenCart based ecommerce store within minutes. Although, if you wish to install using the SSH method, you can follow the step mentioned below.

OpenCart is considered to be one of the easiest CMS for building ecommerce websites. It is still widely used with a very strong community of contributors and users.

It has many useful built-in features, such as multiple payment gateways, multi-store, multi-language support, modules, SEO friendly configuration, and much more. In short, OpenCart is able to answer most of the needs of a startup ecommerce store.

If you are looking to install any version of OpenCart 2.0 on Cloudways through SSH terminal, then follow the step below.

Okay, let’s cut to the chase and dive right in.

How to Install OpenCart 2.0 on a server

You need to ensure that your hosting provider allows you to use SSH on your server. On Cloudways, SSH access is provided inside the Cloud Console, our built-in cloud administration panel. If you have SSH access, then the process will be same. Following are the steps to follow:

  1. Launch PHP Stack
  2. Login to your SSH Terminal
  3. Install the version of your choice through wget command
  4. Unzip the contents
  5. Move the Upload folder to root folder
  6. Begin OpenCart Installation
  7. Remove the “Install” directory
  8. Your fully functional blazing fast OpenCart store is ready for use

opencart

Step 1: Launch PHP Stack

First off, you need to launch PHP stack on your server. You can find the option under the Server Management tab and click “Add App”. Select PHP Stack, highlighted in the picture.

Launch PHP Stack

Step 2: Login to your SSH Terminal

Navigate to Application Management tab and launch your SSH terminal. Note that each application has its own access credentials to the SSH, so make sure you have selected the desired PHP stack.

Screenshot_2

Step 3: Install the version of your choice through wget command

Most probably you may be thinking that one way to install OpenCart is to download the latest version from the official website and upload the files through FTP client. The method sure is easy, but it takes a lot of time to finish with all the uploads.

The quickest way to get the OpenCart installation files is through wget command. This command connects your server with the GitHub repository of OpenCart through which the required installation package gets delivered. Alternatively, you can get the installation files by visiting OpenCart’s GitHub page.

For this tutorial, we are using version 2.0.2.0. Therefore, the command would be:

This will transfer the OpenCart contents in a zipped file to your server.

Step 4: Unzip the contents

Next, we need to unzip the contents. Just use the following command:

This will unzip the contents into the folder, /opencart-2.0.2.0.

Step 5: Move the Upload folder to root folder

Probably you don’t want your OpenCart to exist in a sub-folder (i.e. opencart-2.0.2.0) in this case. It is better we move the contents in the “Upload” folder to the root directory.

To move the data from opencart-2.0.2.0/upload to root directory, we use the following command.

-v: Verbose, displays the information about the command process

./: denotes the current directory we are present. (In this case, it is the public_html folder.)

Move command complete

Step 6: Begin OpenCart Installation

To begin with the OpenCart installation, just visit the URL of your website. In this tutorial, it is a random staging URL generated by Cloudways system.

When you first visit your website with OpenCart files in the root, then installation will initialize. The first page will be the license agreement.

Opencart Install

Next, OpenCart will run a server check. Cloudways default setup is fully compatible with the latest version of OpenCart.

Opencart Server Check

On Page 3, OpenCart will ask you to insert the database details into the application. You can find the details of your database in Application Management under Access Details.

database credentials

After inserting the database details, you’ll need to enter the admin credentials.

 OpenCart Set Admin User

That’s it! On Page 4, you will see a note saying that you should remove the “Install” folder for security reasons.

OpenCart Complete Installation

Step 7: Remove the “Install” directory

As a final step, we will remove the “Install” folder as we don’t want any hackers to reinitialize the OpenCart install process.

To remove it, we will run the following command on SSH terminal.

remove install folder

Your fully functional blazing fast OpenCart store is ready for use

Now, you have a fully functional OpenCart on performance-optimized cloud servers on Cloudways Cloud Platform. You’ll have a blazing fast e-store that loads under a second.

OpenCart-Load-Time

Next step for you is to add data, customize the theme, point the domain name, and get the store going on Cloudways platform. So, don’t just wait. Launch a PHP-based OpenCart hosting server now or install OpenCart in a single click from within the Platform to try out its excellent features!

Create PHP websites without the worry of server management.

Deploy your PHP app on optimized PHP hosting servers.

About Ahsan Parwez

Ahsan is the Community Team Manager at Cloudways - A Managed Cloud Hosting Platform. He loves to solve problems and help Cloudways' clients in any aspect he can. In his free time, you can find him playing RTS PC games.

Stay Connected:

You Might Also Like...