Installing the OpenCart and creating the custom URL:
Hi everyone! Me Rupak Nepali. I am very excited with first video success and now this is our second video. In which I will install OpenCart 2.2 locally and set up 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 database. Go to localhost/phpmyadmin, create 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. File will be located at C: /Windows/System32/drivers/etc/hosts, where hosts is the file.
- 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 are activated, now we are installing OpenCart.
Let’s agree with License Agreement by clicking 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 be curl disabled which you have to enabled from php.ini
In ours let’s create config.php file at root/ folder and admin/ folder. Reload it. Once all issues are solved then click continue button. The next screen prompts you for information about the database you’ll be using and asks for a database username and password field. We already created “webocreation” database, with root username and blank password.
Now let’s enter username and password for the administration. I am creating 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 unique username and password for both the administrator and database for security reason.
Provide your email mine is email@example.com, then click continue button.
You 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 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 front end, login to administration section and insert categories, product and setup shipping and payment gateway and you online store is ready to take order.
So I am at end of second video, 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 quality of videos series. You can follow at my twitter account rupaknpl and subscribe our youtube channel onlinegyannepal. Similarly visit my personal blog https://webocreation.com.
In next video, I will be describing files and folder and OpenCart Framework.
So see you in next video and happy learning and thanks for bearing me for 8 mins.