How to install PrestaShop on an Ubuntu 14.04 VPS

PrestaShop 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:

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> 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
    ErrorLog /var/log/apache2/your-domain.com-error_log
    CustomLog /var/log/apache2/your-domain.com-access_log common

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.

Of course you don’t have to do any of this if you use one of our Linux VPS Hosting services, in which case you can simply ask our expert Linux admins to install PrestaShop for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.


Categories: Tutorials

View Comments

Leave a Comment