I recently had to install the appropriately named open source shopping cart OpenCart on a BlueHost shared web host account and figured it would be good to record the basic steps here in case I need to do it again or if someone else comes along and needs to do the same thing.
Note: All of these actions were performed from a Windows machine.
Part 1: Get OpenCart to the Server
This is pretty straightforward. You need to download the zip file of the latest version of OpenCart from the official website.
You should then create a private key through the cpanel interface to make connecting to your server easier. This is done by visiting the SSH Access section and managing keys. After you create a new key, authorize it and download a ppk format version to use with Putty and WinSCP.
Using a program called WinSCP (that is Windows Secure Copy), you copy the zip file to your server’s file system using the SFTP protocol.
In the Advanced Menu under SSH – Authentication, you can choose your key file for authentication.
Once you have the OpenCart zip file copied over to the server, you will need to SSH into it. A common tool for this on Windows is Putty. However if you are a little computer savy, since Windows 10 you have the option of installing a Bash shell such as you would use in a Linux environment and directly running the ssh command from there.
For now, I will assume you are using Putty.
Run Putty and put your server URL or IP address into the hostname box. In the list of options on the left, expand SSH and select Auth. This will allow you to choose your key file for authentication just like WinSCP. I would recommend saving this session for future use.
If you created your key with a password, which you should do, you will need to enter your username (provided by your webhost) and your key password.
Now you are in.
Navigate to the folder with the zipped OpenCart file and unzip it. This is as simple as running `unzip nameofopencartfile.zip`.
This will create a folder called “upload” and you need to copy all of the files in that folder to your public_html folder or the subfolder related to your url in the public_html folder.
`copy -r upload/* public_html/url_folder/`
Part 2: Setup
Now that we have all of the files on the server. We need to prepare a couple of things before we finish the installation.
First, we need to setup a database and user for OpenCart. Back in your cpanel interface, go to the MySQL database setup and create a new database for this installation. Then create a new database user and give it full privileges on the new database.
In your browser, visit your website URL and you should now see an OpenCart install screen at step 1 with a license agreement.
Accept the license agreement and move to the next step. You may need to rename a couple of config files in the OpenCart directory on your server at this point from config-something.php to config.php, one in the main folder and one in the admin folder.
Next you will input the database information you previously created. And finally you will create an admin user that will be used to manage the site.
That is the basic setup for an OpenCart install.
There may be a popup warning when you first visit the admin page to move the storage folder to a different location outside of public_html. It seems like the site will create a new folder for you automatically, but you may have to manually remove the original folder.
Keep getting wiser, stronger, and better.