Toggle navigation

PrestaShop Image Guide

Version 1.7.2.3

Websoft9 PrestaShop is a pre-configured, ready to run image for running PrestaShop on Alibaba Cloud.

PrestaShop is one of the world’s most popular ecommerce platforms, and most successful open source projects. Around the world, more than 250,000 ecommerce stores run on PrestaShop technology.PrestaShop has comprehensive product features for small, medium or large ecommerce stores. Hundreds of features are standard and 100% free.

Application Software(PrestaShop1.7.2.3)
Software directory: /data/wwwroot/prestashop

Infrastructure(PHP7.0,APACHE2.4)
PHP Configuration File: /etc/php.ini
Default Apache Vhost Configuration File: /etc/httpd/conf.d/vhost.conf
Apache Vhost Configuration directory: /etc/httpd/conf.d
Apache Log Files: /var/log/httpd

Database(MYSQL5.7)
Database install directory: /usr/share/mysql
Database data directory:  /data/mysql
Database Configuration File: /etc/my.cnf
PhpMyAdmin install directory: /usr/share/phpmyadmin

After the installation of Image,please verify it

  • Login on Alibaba Cloud console,get you Internet IP Address
  • Open you Chrome or Firefox on your local PC,visit the http://Internet IP Address and you can enter the installation page directly,if there no response from browser,please check the Security Group settings to ensure that port 80 is been allowed

Three usernames and passwords are required for application installation, application using, andapplication maintenance:

1、PrestaShop:Username and Password is set by youself when installation,
Backend URL:http://youdomain.com/admin
2、MySQL Database:Default username and password is root/123456
Control Panel URL:http://Internet IP Address/phpmyadmin
3、Linux Server:Username is root,Password is set by youself when buying.
Please Using the Putty for ssh remote and WinSCP for SFTP

Note:You can reset the password of OS through Cloud Console if you have forgotten it

It is recommended to complete two steps before the the installation:

  • Domain resolution if you want to use domain for this application (Add an A record to the Internet IP Address of Server from Domain Control Panel)
  • Modify the MySQL password of root through http://Internet IP Address/phpmyadmin

Then access the installation page and complete the installation wizard for the following steps:

  1. Local Chrome or Firefox to visit http://yourdomain or http://Internet IP Address,you will enter the configuration inerface of installation,Select the language,Click “Next”
  2. Agree license, Click “Next”
  3. Set your store information and administration account, Click “Next”
  4. Enter your database configuration, Click “Next”
  5.  Your installation is finished! Your must delete “/data/wwwroot/default/prestashop/install” folder.
  6. Use SSH Command to remove install folder, Then Click “Manage your store”
    root@iZbp1i4rjdsy216yq7lgucZ:/# cd /data/wwwroot/prestashop/
    root@iZbp1i4rjdsy216yq7lgucZ:/data/wwwroot/default/prestashop# mv install install.bak
  7. Enter your administration account, Click “LOG IN”
  8. This is your administration panel:
  9. Use http://<domain name>/  to go to your index page.

Connect to a Linux instance using Windows OS

This section uses PuTTY as an example. PuTTY can be downloaded here.

You can connect to a Linux instance via PuTTY as follows:

  1. Start Putty.exe.
  2. Enter the public IP address of the instance in Host Name (or IP address).
  3. Use the default port 22.
  4. Select SSH as Connection Type.
  5. Type a session name in Saved Sessions, and then click Save. In later logins, you may directly load the session without re-entering the IP address.
  6. Click Open to connect.
  7. Upon first connection, the following dialog box will be displayed. Click Yes.
  8. As prompted, enter the username and password for the Linux ECS instance. The password will not be displayed on-screen. Press the Enter key to complete connection to the instance.

When you connect your computer to the Linux instance successfully, you can operate the instance from your computer.

Use SFTP you can mange file,upload and download file,configure Server.

  1. Start WinSCP. Login Dialog will appear.
  2. Then select your File protocol(SFTP) on the dialog
  3. Enter your host name to Host name field, username to User name and password to Password like below
  4. You may want to save your session details to a site so you do not need to type them in every time you want to connect. Press Save button and type site name.
  5. When appear the dialog below,please select the “yes”
  6. You can manane Linux file below
  7. WinSCP can integrate the Putty and transfer the log in information to Putty
  8. Now you can use Putty(Not need to log in) from the menu bar of WinSCP

Websoft9 Prestashop Image have installed the phpMyadmin

phpMyAdmin install directory: /data/wwwroot/default/phpMyAdmin

Following is the step for access phpMyadmin

  1. Open Chrome or Firefox on your local PC
  2. visit the http://Internet IP Address/phpMyAdmin,you can enter the login page
  3. select you language,Username:root,Password:123456
  4. Click the button “Go”

PrestaShop comes with a set of modules that can be installed/uninstalled and configured as desired, in order to customize and complete your shop.

The range of actions is virtually unlimited: the extensibility of PrestaShop makes it possible to turn your shop into exactly what you intend it to do, instead of you having to comply with constraints that you did not choose – provided you can find the module that does exactly what you need.

Search and install Modules

Login backend,Modules and Services->Modules and Services,you can find the module list and search all the modules

Click the “Install” button you can install it online

Module marketplace(Addons website)

PrestaShop comes bundled with more than 100 modules. Even though it can sound like a lot, you might want to go further by adding extra features that are not available by default in PrestaShop.

There are many more modules available on the PrestaShop Addons website (http://addons.prestashop.com/), PrestaShop’s official marketplace Some are free, others are for-pay, and you are sure to find something that suits your needs! Once you are a seasoned module developer/theme designer, you can even submit your own creations, and sell them on Addons!

Login backend,Modules and Services->Modules & Themes Catalog,you can find the module Marketplace and search all the modules

The “Modules Catalog” page gives you a quick and easy access to the online Addons database of modules and themes. Its interface is pretty straightforward:

  • A search field, with which you can search the whole content of the Addons website.
  • A few selections of modules that you can buy directly, that will help you achieve certain business objectives:
    • Be visible
    • Boost your sales
    • Increase your customer’s average cart size
    • Building trust with payment modules
    • Opt for speed with shipment modules
    • Free partner modules

Any link on the page will send you to the Addons website, where more options are available.

Clicking on an item will open its Addons page in a new browser tab.

New versions of PrestaShop come every few months, sometimes even weeks apart. Some are major, most are minor, but they all bring a slew of innovations, improvements and bug fixes. It is therefore highly advised to keep up with the latest version.

There are two ways to upgrade PrestaShop:

  • Automatic–The automatic upgrade simply uses the free 1-Click Upgrade module.
  • Manual–The manual upgrade has been deprecated, but its documentation is kept for historical purposes – and for those who cannot use the automatic upgrade.

Note:The update process will affect all files and folders included in the main PrestaShop installation. This includes all the core files used to run PrestaShop, all default modules and the default theme. If you have made any modifications to those files, your changes will be lost.

Automatic Upgrade

Prestashop has a module named “The 1-Click Upgrade” that help you update automaticlly.

  1. Login backend,Modules and Services->Modules and Services,Search the “The 1-Click Upgrade”
  2. Click the “Install” button and you can use the automatic upgrade interface now
  3. then,compares your version of PrestaShop with the latest stable one. You can quickly see whether an update is required or not. If you know that there is a more recent version available than the one presented, you can trigger a version check by clicking the “Check if a new version available” button.
  4. If there no new version for upgrade or not suitable for upgrade,you can not use this automatic upgrade interface
  5. Once all the indicators in the “pre-Upgrade checklist” section are green, the update button appears in the “Start your Upgrade” section, along with the URL from which the new version will be downloaded.
  6. Clicking the “Upgrade PrestaShop now !” button triggers the whole process.
  7. Once the upgrade process is launched, the whole configuration page is replaced by two sections: “Activity Log” and “Rollback”.

Note:You should never update your online shop right away. The automatic upgrade tool can fail in some situations, and you might not be able to revert to the previous version.The safest way is to have an exact copy of your shop available, either on your local computer or in another folder of your web server. It should contain all your products, categories, themes, modules, translations, settings, etc.Make a trial upgrade on that copy of your shop. Once the upgrade is done, browse your front and back office thoroughly to make sure that everything is as expected. If not, then the upgrade tool has an issue with your configuration, and you should use the manual upgrade method, which is now deprecated and takes longer, but which may help in your situation.

Manual Upgrade

Doing a manual update is a long and detailed process, which should only be used out of necessity – for instance, if you cannot make an automatic update.Therefore, manual updates should be reserved to experts, meaning those who know how to use development tools such as LAMP, phpMyAdmin, etc.

From the start of the process, your online shop should be disabled (in “maintenance” mode”) so as to make sure that your clients will not lose their carts and orders during the update process. In effect, this means that your shop will be closed for business during the whole process (one to two hours).

The steps of the upgrade process are:

  1. Save and Backup Your Current Store:
    • Deactivate your store (“Maintenance” page of the “Preferences” menu).
    • Back up your files to your desktop, using your FTP client in a new “prestashop-prod” folder. This will be a complete copy of your production site.
    • Back up your database (“Advanced Parameters/DB Backup” page, or using phpMyAdmin).
    • Back up your customized translation (“Export a language” section in “Tools/Translations” tab).
  2. Getting ready for the new version:
    • Download and unzip the latest version of PrestaShop: http://www.prestashop.com/en/download, and unpack it in a new “prestashop-prep” folder.
    • Copy your personal files (images, logos, photos, translations, modules, etc.) from “prestashop-prod” to “prestashop-prep” on your computer. A detailed list is available further down in this guide.
    • Copy the “prestashop-prep” folder to the web folder on your local server (/htdocs/www, or any other name used by the server package you chose). This is the folder where you will first try to upgrade your PrestaShop, keeping your original backed-up files (prestashop-prod) and the files you prepared (prestashop-prep).
    • Recreate the production database on your local server: using phpMyAdmin, create a local database in which you will put the data from your production shop, using the SQL files that were backed-up at the start of the process.
  3. Starting the Local Update:
    • Launch the update script on your local server by accessing it with your browser. In version 1.6, that script is located at /install/upgrade/upgrade.php.
    • Verification of all parameters before the update: follow the instructions on screen and make sure your server conforms to the new version technical requirements.
    • Finishing the update: once the updater has finished, delete the /install folder and access both your front and back office to make sure it works.
  4. QA and Testing:
    • Import your translations (“Import a language pack manually” section in “Localization/Translations” page).
    • Check that your theme is still working as expected. If this is not the case, you will have to edit its files.
    • Test your shop thoroughly: create accounts, buy products, cancel orders, check the invoices, etc.
  5. Start the update on your production web server:
    • Using your FTP client, replace the files for your online shop with those from your “prestashop-prep” folder.
    • Launch the update script on your production server by accessing it with your browser. In version 1.6, that script is located at /install/upgrade/upgrade.php.
    • Verification of all parameters before the update: follow the instructions on screen and make sure your server conforms to the new version technical requirements.
    • Finishing the update: once the updater has finished, delete the /install folder and access both your front and back office to make sure it works.
    • Import your translations (“Import a language pack manually” section in “Localization/Translations” page).
    • Check that the main domain name is correct (“Preferences / SEO & URLs” page, “Shop URL” section).
    • Regenerate your robots.txt files (“Preferences / SEO & URLs” page, “Generate robots.txt” section).
    • Check that your theme still works as expected. If not, you will have to edit its files.
    • Test your store thoroughly: create accounts, buy products, cancel orders, check invoices, etc.
  6. Going live with your up-to-date store
    • Activate your store (“Maintenance” page under the “Preferences” menu).

You’re done! Enjoy all the new features brought by this update!

Routine backup (archives) of the database and application setup is essential to ensure failover is smooth.

Backup is based on the server snapshot automatic backup,manual local backup in two ways, both of which have their own advantages and disadvantages, it is recommended to use together

Automatic Backup by Snapshot of Server

IaaS provider have the “snapshot” function for Server, the snapshot is for the server disk. Snapshot tool can record the specified point in time the hard disk data, all backed up, and can achieve a key recovery.

If you have an automatic snapshot of the disk settings, the following scenes you can be more calm face:

  • Work a few days of the results, was mistakenly deleted
  • Hackers damage your site
  • The content has been messed up

Done a snapshot backup, a key to restore to the backup point of time state. That is, on-site reduction, very good function.

Different cloud vendor snapshot settings slightly different, specific reference:

Manual Backup

Below is the steps for manual backup:

  1. Go to your store’s back office, open the “Maintenance” page under the “Preference” menu, then select “No” for the “Enable Shop” option.
  2. Copy all of your files from your server to your local computer using an FTP client.
  3. Go to the the “DB Backup” page, then follow the instructions on the page.
  4. or Using phpMyAdimin to backup your database

Restore

Prestashop restore is very complex, get more from Making and restoring your own backup

How do I translate PrestaShop into my language?

You can help translate PrestaShop into your language by participating using the Crowdin tool! Thank you for your contribution!

How do I add a language to the back office or for my customers?

This is the same thing, and it is done in two steps:

  • In the “Localization” page of the “Localization” menu, select the country for the language you need, and import the localization package.
  • in the “Languages” page of the “Localization” menu, make sure that the new language is enabled. You can disable a language at any time.

Make sure that your products various text fields (name, description, tags, URL, etc.) are translated in every languages that are displayed to the customer.

See the documentation on the “Localization” page, and the one for the “Languages” page.

How do I customize the translation?

You can edit the translation files directly within PrestaShop, in the “Translations” page of the “Localization” menu.

The PHP configuration file allows you to configure the modules enabled, the email settings or the size of the upload files. It is located at /etc/php.ini.

There are some PHP settings that need to be sufficient when running your application,The values for PHP.ini below are suggested values only.

  • memory_limit – Minimum: 128M Recommended: 512M or better
  • upload_max_filesize – Minimum: 20M
  • post_max_size – Minimum: 20M
  • max_execution_time: At Least 120 Recommended: 300

After modifying the PHP configuration file, restart both Apache and PHP-FPM for the changes to take effect:

# systemctl restart httpd

How to modify the allowed limit for upload?

Modify the  /etc/php.ini file to increase the allowed size for uploads:

; Maximum size of POST data that PHP will accept.
post_max_size = 16M
; Maximum allowed size for uploaded files.
upload_max_filesize = 16M

then,restart the apache

# systemctl restart httpd

How to change the max_execution_time?

If you receive the message “Maximum execution time of 30 seconds exceeded”.You may also like to extend the max_execution_time for PHP and you can modify it by two methods below

Method one: edit your  /etc/php.ini


; Maximum execution time of each script, in seconds
; http://php.net/max-execution-time
; Note: This directive is hardcoded to 0 for the CLI SAPI
max_execution_time = 90
; Maximum amount of time each script may spend parsing request data. It's a good
; idea to limit this time on productions servers in order to eliminate unexpectedly
; long running scripts.

Method two: edit your .htaccess:


<IfModule mod_php5.c>
php_value max_execution_time 90
</IfModule>

How to improve PrestaShop's performances?

Here are a few tips that should enable you to optimize PrestaShop.

Improving PHP performance:Whenever possible, use an opcode cache (or ask your web host to install one for you), in order to alleviate the server’s processing load. Opcode means “operation code”, and defines the compiled state of the dynamic files, which can then be processed faster.PrestaShop is compatible with eAccelerator (http://eaccelerator.net/) as well as the new OPcache feature from PHP 5.5.0: http://www.php.net/manual/en/intro.opcache.php.

Improving MySQL performance:Enable MySQL’s cache (or ask your web host to do it for you), and give it a high value (for instance, 256M).Whenever possible, use the MySQL drop-in replacement Percona Server (http://www.percona.com/software/percona-server), which provides significant improvements over the standard MySQL server thanks to its XtraDB database engine.

How to move PrestaShop to a new Domain?

Here are the main steps when moving PrestaShop to a new domain within the same server. These are mostly a simpler version of the above steps – we do not touch the data, which stays on the same MySQL server.

  1. Put your shop in maintenance mode, so as to not lose new customers or orders will moving the data.
    Go to your back-office, and under the “Preference” menu, open the “Maintenance” page and set the “Enable shop” option to “No”.
  2. Move your files
    1. Make a backup of all the files: connect to your FTP server, and copy all the files and folders to your local hard-drive.
    2. Transfer your files to your new host: Connect to the FTP server for your new host, and copy all the files and folders that you just downloaded to your local hard-drive, as is.
  3. Configuration
    1. On the new server, open the /config/settings.inc.php file and update the settings for the new database server (with your own settings instead of the examples here):
      • define('_DB_SERVER_', 'sql.domainname.com');
      • define('_DB_NAME_', 'prestashop');
      • define('_DB_USER_', 'PS-user');
      • define('_DB_PASSWD_', 'djsf15');
      • define('_DB_PREFIX_', 'ps_');
    2. Log in to your back office, go to the “Preferences” menu, select the “SEO & URLs” page, and in the “Set shop URL” section change the domain name to your new domain. Do the same for the SSL domain.
      In effect, this will update the “PS_SHOP_DOMAIN” and “PS_SHOP_DOMAIN_SSL” rows in the “ps_configuration” SQL table.
  4. Connect to your new FTP server and delete everything except the index.phpfiles in the following folders:
    • /tools/smarty/cache
    • /tools/smarty/compile
    • /tools/smarty_v2/cache
    • /tools/smarty_v2/compile
  5. Go to your back office, and in the “Maintenance” preference page, set the “Enable shop” option back to “Yes”.

You should be good to go! Check that all the links are functioning, that all your products, images, modules and themes are still there, and try to create a new account and place an order so as to make sure your shop is working as expected.

How do I import product data from another application?

The CSV import page enables you to easily fill your product catalog when you have a very large amount of products, or to import data that you exported and converted from another e-commerce tool.

Get more from http://doc.prestashop.com/display/PS16/CSV+Import+Parameters

Use domain you should complete the following steps:

Step One:Domain resolution

e.g,If you using the AliCloud Domain product,you should log in to your Domain Console Panel

And find the domain name resolution interface,then add an A record to the Internet IP Address of Server from Domain Control Panel.

Step Two:Modify the Vhost file

  1. Using SFTP to edit the /ect/httpd/conf.d/vhost.conf
  2. Modify the domain related information like below,then save it
    <VirtualHost *:80>
    ServerName www.mydomain.com
    ServerAlias mydomain.com
  3. Using putty to run the command “systemctl restart httpd”

When install new extension from back-end it will not successful,may be the permissions of file and folder is not appropriate,you should change it

Web site root permissions to follow:
file 644, folder 755 ,Permissions Users and groups www
If there is a file permissions problem, execute the following three commands:

chown -R www.www /data/wwwroot/default/prestashop
find /data/wwwroot/default/prestashop -type d -exec chmod 755 {} \;
find /data/wwwroot/default/prestashop -type f -exec chmod 644 {} \;

Apache http service

~# systemctl start httpd
~# systemctl stop httpd
~# systemctl restart httpd

MySQL  service

~# systemctl start mysqld
~# systemctl stop mysqld
~# systemctl restart mysqld

This document is original from Websoft9.In order to ensure the seriousness and usability of the documentation, no one may misappropriate or modify the second distribution. The need for friends reproduced please mark the source, otherwise we reserve the right to give legal action.

We will periodically update the documentation. Please visit the online documentation for the latest version

This document URL: http://en.websoft9.com/xdocs/prestashop-image-guide/
Support & Partnership: http://en.websoft9.com