<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PrestaShop Archives - LinuxTuto</title>
	<atom:link href="https://www.linuxtuto.com/tag/prestashop/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.linuxtuto.com/tag/prestashop/</link>
	<description>Linux Sysadmin and DevOps blog</description>
	<lastBuildDate>Fri, 26 Aug 2022 13:09:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.linuxtuto.com/wp-content/uploads/2022/01/cropped-LT_faveicon-32x32.png</url>
	<title>PrestaShop Archives - LinuxTuto</title>
	<link>https://www.linuxtuto.com/tag/prestashop/</link>
	<width>32</width>
	<height>32</height>
</image> 
<site xmlns="com-wordpress:feed-additions:1">201456972</site>	<item>
		<title>How to Install PrestaShop on Ubuntu 22.04</title>
		<link>https://www.linuxtuto.com/how-to-install-prestashop-on-ubuntu-22-04/</link>
					<comments>https://www.linuxtuto.com/how-to-install-prestashop-on-ubuntu-22-04/#respond</comments>
		
		<dc:creator><![CDATA[LinuxTuto]]></dc:creator>
		<pubDate>Fri, 26 Aug 2022 13:09:20 +0000</pubDate>
				<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[PrestaShop]]></category>
		<guid isPermaLink="false">https://www.linuxtuto.com/?p=634</guid>

					<description><![CDATA[<p>PrestaShop is an open-source platform that allows anybody to easily create an e-commerce website platform to start selling products. The software was created with PHP...</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-prestashop-on-ubuntu-22-04/">How to Install PrestaShop on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>PrestaShop is an open-source platform that allows anybody to easily create an e-commerce website platform to start selling products. The software was created with PHP and released under the Open Software License (OSL).</p>
<p>In this tutorial, we will explain how to install and configure the PrestaShop e-commerce platform on Ubuntu 22.04.</p>
<h2><span class="has-inline-color has-vivid-purple-color">Step 1: Update Operating System</span></h2>
<p>Update your <strong>Ubuntu</strong> <strong>22.04</strong> operating system to the latest version with the following command:</p>
<pre><code>$ sudo apt update &amp;&amp; sudo apt upgrade -y</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 2: Install Nginx webserver</span></h2>
<p>You can install it via <code>apt</code> package manager by executing the following command.</p>
<pre><code>$ sudo apt install nginx</code></pre>
<p>You can start the Nginx service and configure it to run on startup by entering the following commands:</p>
<pre><code>$ sudo systemctl start nginx
$ sudo systemctl enable nginx</code></pre>
<p>Verify the status of the <code>Nginx</code> service using <code>systemctl status</code> command:</p>
<pre><code>$ sudo systemctl status nginx</code></pre>
<p>Output:</p>
<pre><code>● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running)
       Docs: man:nginx(8)
    Process: 835 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
    Process: 1059 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
   Main PID: 1060 (nginx)
      Tasks: 2 (limit: 2200)
     Memory: 7.9M
        CPU: 94ms
     CGroup: /system.slice/nginx.service
             ├─1060 "nginx: master process /usr/sbin/nginx -g daemon on; master_process on;"
             └─1061 "nginx: worker process"
</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 3: </span><span class="has-inline-color has-vivid-purple-color">Install PHP and PHP extensions for PrestaShop</span></h2>
<p>By default, Ubuntu 22.04 comes with PHP version 8.1.</p>
<p>However, PrestaShop requirement PHP7.4. So you will need to add the <code>DEB.SURY.ORG</code> repository to <code>APT</code>.</p>
<pre><code>$ sudo apt install software-properties-common</code></pre>
<pre><code>$ sudo add-apt-repository ppa:ondrej/php -y</code></pre>
<p>To install PHP and additional PHP modules to support PrestaShop, run the following command:</p>
<pre><code>$ sudo apt-get install php7.4 php7.4-{cli,fpm,common,curl,zip,gd,mysql,xml,mbstring,json,intl}</code></pre>
<p>Verify if PHP is installed.</p>
<pre><code>php7.4 -v</code></pre>
<pre><code>Output:
PHP 7.4.30 (cli) (built: Aug  1 2022 15:06:35) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
</code></pre>
<p>After installing all the packages, edit the php.ini file:</p>
<pre><code>$ sudo nano /etc/php/7.4/fpm/php.ini</code></pre>
<p>Change the following settings per your requirements:</p>
<pre><code>memory_limit = 512M
post_max_size = 32M
upload_max_filesize = 32M
date.timezone = America/Chicago</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 4: Install MariaDB and create a database</span></h2>
<p>MariaDB is a free and opensource database engine that is flexible, robust and easy-to-use. To <a href="https://www.linuxtuto.com/how-to-install-mariadb-10-7-on-debian-11/">install MariaDB</a> run the following command:</p>
<pre><code>$ sudo apt install mariadb-server mariadb-client</code></pre>
<p>Verify the status of the <code>MariaDB</code> service using <code>systemctl status</code> command:</p>
<pre><code>$ sudo systemctl status mariadb</code></pre>
<p>Output:</p>
<pre><code>● mariadb.service - MariaDB 10.6.7 database server
     Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
     Active: active (running)
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 22956 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 9 (limit: 2200)
     Memory: 57.0M
        CPU: 447ms
     CGroup: /system.slice/mariadb.service
             └─22956 /usr/sbin/mariadbd
</code></pre>
<p>By default, MariaDB is not hardened. You can secure MariaDB using the <code class=" prettyprinted"><span class="pln">mysql_secure_installation</span></code> script.</p>
<pre><code>$ sudo mysql_secure_installation</code></pre>
<p>Configure it like this:</p>
<pre><code>- Set root password? [Y/n] <strong>Y</strong>
- Remove anonymous users? [Y/n] <strong>Y</strong>
- Disallow root login remotely? [Y/n] <strong>Y</strong>
- Remove test database and access to it? [Y/n] <strong>Y</strong>
- Reload privilege tables now? [Y/n] <strong>Y</strong></code></pre>
<p>Now run the command below to log in to the MariaDB shell.</p>
<pre><code>$ sudo mysql -u root -p</code></pre>
<p>Once you are logged in to your database server you need to create a database for the PrestaShop installation:</p>
<pre><code>MariaDB [(none)]&gt; CREATE DATABASE prestashop;
MariaDB [(none)]&gt; CREATE USER 'prestashop'@'localhost' IDENTIFIED BY 'Str0ngWedrf1';
MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON prestashop. * TO 'prestashop'@'localhost';
MariaDB [(none)]&gt; FLUSH PRIVILEGES;
MariaDB [(none)]&gt; exit;</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 5: Download PrestaShop</span></h2>
<p>The latest version of PrestaShop is available to <a href="https://www.prestashop.com/en/versions">download from their website</a>. As of writing this tutorial, the latest version available is 1.7.8.7.</p>
<pre><code>$ sudo wget https://www.prestashop.com/en/system/files/ps_releases/prestashop_1.7.8.7.zip</code></pre>
<p>Then extract file into the folder <strong>/var/www/prestashop/</strong> with the following command:</p>
<pre><code>$ sudo apt -y install unzip 
$ sudo unzip prestashop_1.7.8.7.zip -d /var/www/prestashop/</code></pre>
<p>Enable permission for the Nginx webserver user to access the files:</p>
<pre><code>$ sudo chown -R www-data:www-data /var/www/prestashop/</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 6: Configure Nginx for PrestaShop</span></h2>
<p>Run the commands below to create a new VirtualHost file called <kbd>prestashop</kbd> in the <strong>/etc/nginx/conf.d/</strong> directory.</p>
<pre><code>$ sudo nano /etc/nginx/conf.d/prestashop.conf</code></pre>
<p>Paste the content as shown below:</p>
<pre><code>server {
    listen 80;
    server_name your-domain.com;

    access_log /var/log/nginx/your-domain.com-access.log;
    error_log /var/log/nginx/your-domain.com-error.log;

    root /var/www/prestashop;

    index index.php;

    client_max_body_size 16M;

    error_page 404 /index.php?controller=404;

    rewrite ^/(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$1$2.jpg last;
    rewrite ^/(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$1$2$3.jpg last;
    rewrite ^/(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$1$2$3$4.jpg last;
    rewrite ^/(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last;
    rewrite ^/(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last;
    rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last;
    rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg last;
    rewrite ^/(\d)(\d)(\d)(\d)(\d)(\d)(\d)(\d)(-[\w-]+)?/.+\.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last;
    rewrite ^/c/([\w.-]+)/.+\.jpg$ /img/c/$1.jpg last;

    rewrite ^images_ie/?([^/]+)\.(gif|jpe?g|png)$ js/jquery/plugins/fancybox/images/$1.$2 last;

    rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=$1 last;

    rewrite ^(/install(?:-dev)?/sandbox)/.* /$1/test.php last;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location /admin-dev/ {
        if (!-e $request_filename) {
            rewrite ^ /admin-dev/index.php last;
        }
    }

    location ~ /\. {
        deny all;
    }

    location ~ ^/(app|bin|cache|classes|config|controllers|docs|localization|override|src|tests|tools|translations|var|vendor)/ {
        deny all;
    }

    location ~ ^/modules/.*/vendor/ {
        deny all;
    }

    location ~ \.(log|tpl|twig|sass|yml)$ {
        deny all;
    }

    location /img {
        location ~ \.php$ { deny all; }
    }

    location /upload {
        location ~ \.php$ { deny all; }
    }

    location ~ [^/]\.php(/|$) {
        fastcgi_split_path_info ^(.+?\.php)(/.*)$;

        try_files $fastcgi_script_name =404;

        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $request_filename;

        fastcgi_index index.php;

        fastcgi_keep_conn on;
        fastcgi_read_timeout 180s;
        fastcgi_send_timeout 180s;

        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }
}</code></pre>
<p>Remember to replace <strong><code>your-domain.com</code></strong> with the domain name of your server.</p>
<p>Save and exit the configuration file.</p>
<p>To implement the changes, restart Nginx webserver:</p>
<pre><code>$ sudo systemctl restart nginx</code></pre>
<h2><span class="has-inline-color has-vivid-purple-color">Step 7: Access PrestaShop Web Interface</span></h2>
<p>Open your web browser and type the URL <strong><code>http://your-domain.com</code></strong>. You should see the following page:</p>
<p><img fetchpriority="high" decoding="async" class="size-large wp-image-642 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-1024x488.jpg" alt="PrestaShop Installer" width="1024" height="488" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-1024x488.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-300x143.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-768x366.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-1536x732.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-1222x582.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-897x427.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01-684x326.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-01.jpg 1917w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>Choose your language and click on <strong>Next</strong>.</p>
<p><img decoding="async" class="size-large wp-image-643 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-1024x486.jpg" alt="License Agreements" width="1024" height="486" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-1024x486.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-300x142.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-768x365.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-1536x729.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-1222x580.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-897x426.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02-684x325.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-02.jpg 1911w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>Accept the license and click on the <strong>Next</strong>.</p>
<p><img decoding="async" class="size-large wp-image-645 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-1024x495.jpg" alt="PrestaShop Configuration" width="1024" height="495" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-1024x495.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-300x145.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-768x371.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-1536x742.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-1222x591.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-897x434.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03-684x331.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-03.jpg 1916w" sizes="(max-width: 1024px) 100vw, 1024px" /></p>
<p>Provide your site information and click on the <strong>Next</strong>.</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-647 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-1024x489.jpg" alt="PrestaShop Database Configuration" width="1024" height="489" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-1024x489.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-300x143.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-768x367.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-1536x733.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-1222x583.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-897x428.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04-684x326.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-04.jpg 1915w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Provide your database information and click on the <strong>Next</strong>.</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-649 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-1024x443.jpg" alt="Your installation is finished!" width="1024" height="443" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-1024x443.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-300x130.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-768x332.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-1536x665.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-1222x529.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-897x388.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05-684x296.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-05.jpg 1890w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Click on the “<strong>Manage your store</strong>“. But as we try to login, an error appears “<code>For security reasons, you cannot login to the back office until you delete the installation folder</code>”</p>
<p>To delete the installation folder, run the command below on the server:</p>
<pre><code>$ sudo rm -r /var/www/prestashop/install</code></pre>
<p>After deleting the folder just refresh the login page and this time you will get the login page.</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-650 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1024x491.jpg" alt="PrestaShop Login Page" width="1024" height="491" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1024x491.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-300x144.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-768x369.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1536x737.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1222x586.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-897x430.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-684x328.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06.jpg 1892w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<p>Provide your admin username and password and click on <strong>LOG IN</strong>. You will be redirected to the dashboard:</p>
<p><img loading="lazy" decoding="async" class="size-large wp-image-651 aligncenter" src="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-1024x492.jpg" alt="PrestaShop Dashboard" width="1024" height="492" srcset="https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-1024x492.jpg 1024w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-300x144.jpg 300w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-768x369.jpg 768w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-1536x738.jpg 1536w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-1222x587.jpg 1222w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-897x431.jpg 897w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1-684x329.jpg 684w, https://www.linuxtuto.com/wp-content/uploads/2022/08/prestashop-06-1.jpg 1891w" sizes="auto, (max-width: 1024px) 100vw, 1024px" /></p>
<h2><span class="has-inline-color has-vivid-purple-color">Comments and Conclusion</span></h2>
<p>Congratulations! You have successfully installed PrestaShop e-commerce platform. Thanks for using this tutorial for installing the PrestaShop on your Ubuntu 22.04 OS.</p>
<p>The post <a href="https://www.linuxtuto.com/how-to-install-prestashop-on-ubuntu-22-04/">How to Install PrestaShop on Ubuntu 22.04</a> appeared first on <a href="https://www.linuxtuto.com">LinuxTuto</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.linuxtuto.com/how-to-install-prestashop-on-ubuntu-22-04/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">634</post-id>	</item>
	</channel>
</rss>
