PrestaShop Tutorial

Uncategorized

Have you ever wanted your own online store?  Well, here is your chance to get your own full featured online market place with this easy to use tutorial! 
image

First off, you might be wondering why PrestaShop when there are many solutions easier to start with and setup including ones offered by hosting providers?  Well, quite simple, hosting your own relieves you of your monthly hosting fee’s.  Also, many providers give a limit of items sold, or a limit of sales volume and charge extra to expand your limits.  Also, PrestaShop has support for multivendor setup built in which is not an easy task to do with WordPress ecommerce plugins.  If you can install WordPress on your own server, PrestaShop is not that trivial of a task to setup. 

First off, follow the guide to setting up a LAMP server here.  Please note, in this example, I am using TTOS Linux Version 1.0 PR4 (It is a 64-bit Debian GNU/Linux 8.x distribution, any modern Debian, Linux Mint, or Ubuntu will work).  After this, you want to instll phpmyadmin with the following command as root…

“# apt-get install phpmyadmin”

During the install, it will ask a few setup questions.  You want to choose Apache2 as the web server, and say yes to setup with dbconfig-common.  You will be prompted for your MySQL username / password as well.  You will then be asked to enter the password that you would like to log into phpmyadmin with.

After the install completed, you need to add it to Apache2 configuration.  Using the command line, type the following as root user…

” # nano /etc/apache2/apache2.conf “

then add an include memo for phpmyadmin

Include /etc/phpmyadmin/apache.conf “

save and exit, then restart Apache2 with the following command…

” # service apache2 restart “

The next step is to setup .htaccess file to secure phpmyadmin with Apache2’s native implementation.  First, edit the config file with the following command as root…

” # nano /etc/phpmyadmin/apache.conf  “

Under directory section, add “AllowOverride All” under “DirectoryIndex index.php”

       Options FollowSymLinks
       DirectoryIndex index.php
       AllowOverride All”

Next, type the following as root…

” # nano /usr/share/phpmyadmin/.htaccess “

Type in the following to setup user authorization…

” AuthType Basic
AuthName “Restricted Files”
AuthUserFile /path/to/passwords/.htpasswd
Require valid-user”

Now we can create a password file with the following command…

” # htpasswd -c /path/to/passwords/.htpasswd username

After saving the username and password, you must restart Apache2 for changes to take effect…

# service apache restart”

Now you can log in to phpmyadmin with using “http://yourdomain/phpmyadmin” in your web browser.  Login to your server using root account, and your password.  In the listview to the left of the screen, click new+, give the database a name, then click create.  Find your new database listed in the list view, select it, then click in “new” group, “add user”.  Don’t select global privileges for the user, just grant all on your specific database.  Write down your database name, username, and password.  Click “go”

TIP: don’t use the name presta, prestashop, shop, or any name hinting what it is for.  This makes it harder to exploit the database.  Search the web for tips on securing databases in MySQL. 

Now we need to make sure we have all the php modules required for prestashop before we can begin the install…

# apt-get install php5-cli php5-mysql php5-gd php5-mcrypt php5-memcache “

Next, issue the following set of commands to download and unpack prestashop…

” # cd /var/www/
# wget http://www.prestashop.com/download/old/prestashop_1.6.0.9.zip
# uzip prestashop_1.6.0.9.zip”

This will create the directory /var/www/prestashop with the webstore contents inside.  From here, we need to create a config file for the web server, and activate it.  First we create a prestashop config file. 

“# nano /etc/apache2/sites-available/prestashop.conf”

and type in the following as the contents (using your own email address, and domain name)….


ServerAdmin admin@your-domain.com
DocumentRoot /var/www/prestashop/
ServerName your-domain.com
ServerAlias www.your-domain.com

           Options FollowSymLinks Indexes MultiViews
            AllowOverride All

      ErrorLog /var/log/apache2/your-domain.com-error_log 
      CustomLog /var/log/apache2/your-domain.com-access_log common

Save the file and activate the configuration by issuing the following commands…

“# a2ensite prestashop.conf”
“# service apache2 restart”

Next, give permissions to the directory with the following…
# chown www-data:www-data -R /var/www/prestashop”

Now we login “http://yourdomain.com” and follow the setup using the database, username, and password created from phpmyadmin.

When setup is complete, delete the install directory for security reasons with the following command as root…

“# rm -frv /var/www/prestashop/install”

And that’s it!  If you set up a secure prestashop using this tutorial, please post a link in the comments below.  Also include any issues you had, and how you solved them for other readers.  Your site link serves us as a demo of the outcome of this tutorial, and provides you with a source of free marketing!  Our site was created with this set of procedures and can be checked out at the following link…

TTPC Systems Store

11 comments

  • Cool blog! Is your theme custom made or did you download it from somewhere? A design like yours with a few simple tweeks would really make my blog shine. Please let me know where you got your design. Kudos

    • My site is a WorPress powered site. You can search for and apply themes from the dashboard. The theme I’m using is from WordPress as well.

    • I am glad to have been of service. If you need any help with this subject, or any Linux related help, feel free to post a question here on this site.

  • – Your children are precious and your photos of them are incredible! A friend of mine turned me on to your blog and I assure you if you ever wanted to do sessions in Austin for a day or so we could get you booked up… bring the lila.estThtnk you for the inspiration and for sharing those babes with us.[]

  • I just want to tell you that I’m new to weblog and truly liked you’re blog site. Almost certainly I’m want to bookmark your blog . You really come with fabulous stories. Cheers for sharing with us your website page.

  • Does PrestaShop cost much to run? I use WooCommerce, but they have really annoyed me lately. I just got hit with a $10k bill for a few extensions I own (completely out of the blue). WooCommerce have increased their prices by 50 on all annual renewals – without notifying their customers! Seems pretty weird. Nevertheless, I am looking to jump ship and not sure which ecommerce system to use on our store.

    • I use both PrestaShop and WooCommerce professionally and both are free. Some premium plugins are what cost money. I host both my install and my clients install’s on my own Opteron server. I have better performance than a standard VPS.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.