I am drafting this article specially for GUI lovers. Because Installing an OpenCart on DigitalOcean or VPS may be a tedious task for not-so tech savvy user. Most of us opt VPS for performance and pocket-friendly investment. Before opting VPS, most of us used shared hosting environment via cPanel. The cPanel makes most of the task quite easy. But here, on DigitalOcean Droplet (VPS) there is no such tool. Instead, you need to buy it separately. However, everybody cannot afford the cPanel license due to budget constraint. Then what to do now?
DigitalOcean gives access to their Droplet via SSH or Putty-like consoles. Personally, I am not so experienced to handle all things through the console or command interface. Then I googled for Graphical User Interface (GUI) which can bake an OpenCart in 2-3 clicks. In cPanel, Softaculous is a life-saving tool for app installation to maintenance.
I tried Installatron app installer too. But not succeed to install OpenCart on DigitalOcean Droplet. Then I used ServerPilot.io website. I’m already using ServerPilot.io for WordPress installation. But no idea whether it can create the environment for OpenCart. So, I did experiment with ServerPilot.io, surprisingly the result was positive. Now, I’m sharing with you. Hope it might helpful you too.
1. Create a Droplet on Digital Ocean
Ignore this step if you already created a droplet on DigitalOcean. Verify that the droplet must be LAMP or LEMP on Ubuntu 14 OS. For those who must create a new droplet, follow steps.
- Log in / Sign up to DigitalOcean account
- Click on Create Droplet button
- Select One-Click Apps tab
- Select LAMP on 14.04 or LEMP on 14.04
- Choose desired size hardware (any size suitable)
- Choose a Datacenter region
- Set additional option (optional)
- Add your SSH Key (optional)
- Finalize number of droplets
- Give a preferred hostname
- Press Create Button
2. Create account on ServerPilot.io
- Sign up / Log in
- Click on Connect to Server button
- Fill the information and click on Connect to ServerPilot button, as shown in below screenshot
- Go to ServerPilot’s SERVERS section
- Select newly created server from list
- Press +Create App button
- Fill the information with help of the following screenshot
- Go to Apps section of ServerPilot. Verify your app in the list.
Once completing above steps, the next step will be downloading an FTP Client. These client helps to access server-side file and directory structures via Graphical User Interface. Unlike Putty and other SSH Client, you don’t require any knowledge of command. Just follow simple steps. I know these all steps look long but due to detail explanation they are longer. In fact, they are amazingly easy to follow and remember.
3. Creating Database via ServerPilot.io
OpenCart needs a valid database with a valid username. ServerPilot made easy to be creating database and database user.
4. Downloading an FTP Client: Cyberduck
There are lots of FTP client available to download. FileZilla is one of them. We intentionally not described FileZilla as it unable to zip and unzip the archive file. Whereas Cyberduck will easily do this. So, here we preferred the Cyberduck.
- Go to Cyberduck’s official website
- Download your preferred version
- Open Cyberduck application
- Click on Open Connection button, located upper left side corner
- Enter the SFTP credentials (see below screenshot). Remember to use the username and password sent via DigitalOcean for Droplet. Using username and password generated for ServerPilot may not work properly.
- Select an app folder (remember the app name created in ServerPilot)
- Go to public Folder
- Download desired OpenCart version from an official website.
- Upload the downloaded zip file into a public folder via Cyberduck. Alternatively, you can drag files and folder into Cyberduck or FileZilla for bulk upload.
- Make sure the permission for zip must be 644 (right click > info)
- Right click on zip file > Expand Archive
- Click on Refresh button. The view will be as shown in below screenshot
- Now go to opencart-2.2.x.x > upload
- Select all files from the upload directory by pressing Ctrl + A
- Edit menu > Cut
- Now come back to public folder by pressing back arrow button
- Delete (not cut) index.php file from public folder via right click on index.php > Delete
- Paste the previously copied files and directory into public folder via Edit > Paste
- Press Move to start moving process. It may take few seconds/minutes (about 1-5 minutes depends on server)
- Rename config-dist.php to config.php located in public folder and public/admin folder (remember you have to rename two files)
5. Installing OpenCart on DigitalOcean via Browser
Now open your website in the browser (i.e. Firefox, Chrome, etc.). It will automatically divert you to http://example.com/install/index.php
- Press Continue button
- Make everything configured correctly.
- Enter required information. See below screenshot.
- Done..! You have installed OpenCart successfully..!
6. Cleaning Installation Files
After completion of installation of OpenCart, you can access to your site. Your site may look as shown below.
Now you need to delete installation files.
- Open Cyberduck and navigate to app’s public folder
- Delete following files as shown in the following screenshot
- Setup Zip file
- Extracted directory
- Install Folder
In this way, you can install OpenCart on DigitalOcean. Please share your doubts below comments, if any.