How to install PrestaShop on an Ubuntu

prestashopPrestaShop is an open source e-commerce solution, based on PHP and MySQL that allows you to easily create an online store.

To install PrestaShop on an Ubuntu VPS follow the very easy steps described below.

At the time of writing this tutorial, the latest stable version of PrestaShop is v1.6.0.9 and it requires:

PHP >= 5.1 with the following PHP extensions enabled: cURL, GD, GZIP, PDO, DOM, SimpleXML and SOAP. Also, using MemCached and mycrpt PHP extensions is highly recommended for better site performance.
Apache Web Server >= 2.0 compiled with mod_gzip and mod_rewrite modules.
MySQL >= 5.0 installed on your virtual server.

Update the server’s OS packages using the following commands:

apt-get update
apt-get upgrade

Install PHP, MySQL and PHP modules required by PrestaShop:

apt-get install mysql-server php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-memcache

Download the latest version of PrestaShop available at http://www.prestashop.com/en/download to the server and extract it using the following commands:

cd /root/
wget http://www.prestashop.com/download/old/prestashop_1.6.0.9.zip
unzip prestashop_1.6.0.9.zip

Create a new MySQL database for PrestaShop on your server:

mysql -u root -p
mysql> CREATE DATABASE prestashopdb;
mysql> GRANT ALL PRIVILEGES ON prestashopdb.* TO ‘prestashop’@’localhost’ IDENTIFIED BY ‘your-password’ WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;
mysql> quit

Create a new virtual host directive in Apache. For example, create a new Apache configuration file ‘prestashop.conf’:

vi /etc/apache2/sites-available/prestashop.conf

Then, add the following lines:

<VirtualHost *:80>
ServerAdmin admin@your-domain.com
DocumentRoot /var/www/prestashop/
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/prestashop/>
Options FollowSymLinks Indexes MultiViews
AllowOverride All
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Run the following command:

ln -s /etc/apache2/sites-available/prestashop.conf /etc/apache2/sites-enabled/prestashop.conf

Edit the ‘/etc/php5/apache2/php.ini’ PHP configuration file and add/modify the following lines:

memory_limit = 128M
upload_max_filesize = 16M
max_execution_time = 60
file_uploads = On
allow_url_fopen = On
magic_quotes_gpc = Off
register_globals = Off

Restart the Apache web server for the changes to take effect:

service apache2 restart

Move the PrestaShop installation files to the document root directory defined in the virtual host directive above:

mv /root/prestashop/ /var/www/prestashop/

Also, the webserver user (www-data) needs to be able to write to files and directories inside the ‘/var/www/prestashop’ directory, so it can easily be accomplished by executing the following command:

chown www-data:www-data -R /var/www/prestashop/

Open http://your-domain.com/ in your popular web browser and follow the easy instructions.

For security reasons, it is recommended to delete the install directory (‘/var/www/prestashop/install’) once you are done with the installation process. That is it. The PrestaShop installation is now complete.

How to install PrestaShop on an Ubuntu
Written by: AFRIDA YANTI
Reting: 4.9


Cheap Best Hosting is a leading provider of web hosting, shared hosting, resellers hosting, virtual private servers, vps hosting, dedicated servers and domain name registration.


Follow me on Google+ | Twitter | Facebook | Linkedin | YouTube

Share This Post

Recent Articles

Leave a Reply

© 2017 Cheap Best Hosting Blog. All rights reserved. · Entries RSS · Comments RSS
Hosting By Cheap Best Hosting