Hi everyone! Me Rupak Nepali. I am very excited about the first video success – “Introduction and Table of Contents – OpenCart Development” and now this is the second video. In which I will install OpenCart 3.0.2.0 locally and set up a custom URL to work locally.
To begin the installation process, first, download OpenCart. Let’s go to OpenCart.com and download it. Now let’s go to D: /xampp/htdocs folder as I have installed Xampp at D: / folder.
Now create a folder, we are going to create webocreation/ folder where we extract the zip folder we downloaded. Then go to upload/ folder and copy all files and folder and paste to the webocreation/ folder.
Now let’s create a database. Go to localhost/phpmyadmin, create a database named “webocreation”.
Now first let’s create custom URL to work locally:
Steps to create custom URL to work locally:
- Open up the Xampp control panel and stop Apache (Ensure that you don’t have it running as a service.
- Navigate to D:/xampp/apache/conf/extra or wherever you installed Xampp
- Open up your text editor with administrative privileges and open up httpd-vhosts.conf found in the D:/xampp/apache/conf/extra folder
- At the very bottom of the file paste the following (check if it exists there already)
NameVirtualHost *:80
<VirtualHost *:80>
DocumentRoot "D: /xampp/htdocs"
ServerName localhost
</VirtualHost>
- Without that line of code, you will lose access to your default htdocs/ For eg: http://localhost/ will be inaccessible.
- Now write the virtual host code here for our webocreation folder:
<VirtualHost *:80>
DocumentRoot "D: /xampp/htdocs/webocreation"
ServerName webocreation.dev
ServerAlias www.webocreation.dev
<Directory "D: /xampp/htdocs/webocreation">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
- Now we head over to our Windows Hosts File, to edit the HOSTS. The file will be located at C: /Windows/System32/drivers/etc/hosts, where hosts are the file.
127.0.0.1 localhost
- look for the line above, and enter your site mimicking the layout
127.0.0.1 localhost
127.0.0.1 webocreation.dev
- Change this to the domain name you choose earlier
- Change it to reflect the lines above (if you have problems saving it meant you didn’t have your text editor running in admin mode.
- Restart Apache and test to make sure it is working.
Now go to the URL webocreation.dev. Here we go our custom URL is activated, now we are installing OpenCart.
Let’s agree with the License Agreement by clicking the continue button. If you see any red highlights then we are having some issues. See here our config.php file is missing. Similarly, you may see other errors then you have to solve them. One could curl disabled which you have to enable from php.ini
In ours let’s create the config.php file at root/ folder and admin/ folder. Reload it. Once all issues are solved then click the continue button. The next screen prompts you for information about the database you’ll be using and asks for the database username and password field. We already created “webocreation” database, with a root username and a blank password.
Now let’s enter username and password for the administration. I am creating a very hard password which I recommend not to use in your installation. All this is because of laziness and I don’t need the installation to be secure; accepting the easiness, in this case, is fine. In a production OpenCart installation, be sure that you have a unique username and password for both the administrator and the database for security reasons.
Provide your email mine is webocreation.com@gmail.com, then click continue button.
Your installation is complete.
Now don’t forget to delete the install folder, I see in most clients programmer just rename the install/ folder and by-passing error message but there will be security holes remained in that folder so the hacker can find it easily and exploit your database so strongly recommended to delete the install/ folder after installation is complete.
Now you can view the front end, login to the administration section and insert categories, product and set up shipping and payment gateway and your online store is ready to take the order.
So I am at the end of the second video, I hope you liked it. Please, please don’t forget to post your questions or comments so that I can add extra topics or things that I need to develop which will help me to develop the quality of videos series. You can follow at my twitter account @rupaknpl and subscribe to our youtube channel “onlinegyannepal”. Similarly, visit my personal blog https://webocreation.com.
In the next video, I will be describing files and folder and OpenCart Framework. So, see you in the next video and happy learning and thanks for bearing me for 8 mins.