Message-ID: <1650489225.378836.1711676358435.JavaMail.root@confluence-doc2-production> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_378835_1692856139.1711676358430" ------=_Part_378835_1692856139.1711676358430 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
This guide will help you configure a better and safer Web server.
Once this is done, you will be ready to install PrestaShop, using our Getting Started guide: http://doc.prestashop.com/display/PS15/Getting+Started .
Many of the advices in this guide require you to edit the php.ini<=
/code> file, found in your server's PHP install folder (not in PrestaShop's=
folder).
Not all hosts will allow you to edit or even access this file, so contac= t your host if you cannot access it.
For instance, you probably won't have access to php.ini
on =
a shared hosting. If your host doesn't provide the required configuration b=
y default and you cannot touch php.ini
, then you should either=
move to a dedicated hosting, or change to a more permissive host.
Still, editing php.ini
remains a technical and advanced act=
ion. If your shop does currently work well, there's no need for you to touc=
h that file, let alone change host.
Editing the PHP configuration requires you to change some values in the =
php.ini
file, most of the time from "On" to "Off" or vice vers=
a. The file contains a lot of documentation for each line: be sure to read =
the ones pertaining to your changes, in order to better understand them. Be=
careful of what you edit, as this has a direct impact on the way PHP runs,=
and therefore on your servers stability and even security.
In order for PrestaShop 1.5.x to run properly, your PHP installation mus= t feature the following settings and libraries:
allow_url_fopen
.The MySQL extension enables to access your data. PrestaShop simply canno=
t work without it.
You can also use the drop-in replacement Percona Serv=
er, which offers better performance than the standard MySQL server.
The GD library enables PHP to dynamically manipulate images. PrestaShop = uses it to resize and rework the image files that are uploaded (watermarkin= g, trimming, etc.). Without images, an online shop loses most of its intere= st, so make sure that GD is enabled!
The Dom extension enables to parse XML documents. PrestaShop uses for va=
rious functionalities, like the Store Locator. It is also used by some modu=
les, as well as the pear_xml_parser
library.
The allow_url_fopen
directive enables modules to access rem=
ote files, which is an essential part of the payment process, among others =
things. It is therefore imperative to have it set to ON.=
p>
In short, it is imperative to have the following directives set to the i= ndicated values:
extens= ion =3D php_mysql.dll extension =3D php_gd2.dll allow_url_fopen =3D On=20
Your PHP installation should feature the following settings and librarie= s, for best experience:
register_globals
disabled.magic_quotes
disabled.allow_url_include
disabled.Having GZip support enables the web server to pack web pages, images and= scripts before sending them to the browser. This makes navigating the shop= faster, and therefore a more agreeable experience.
The Mcrypt provides PHP with a hardened security layer, which enables th= e use of more hashing and cryptography algorithms.
The register_globals
directive, when enabled, defines all e=
nvironment variables (GET, POST, COOKIE, SERVER...) as global variables. It is unsafe to use unset variables, because a user could ea=
sily set a value into this variable by using the GET method, for example. I=
t is therefore imperative to set register_globals
to O=
FF.
The magic_quotes
directive automatically escapes (or "adds =
antislashes", see http://php.net/manual/en/funct=
ion.addslashes.php ) to all special character sequences ('
=
, "
, \
, NULL
) for all environment va=
riables (GET, POST, COOKIE, SERVER...). This option must be set to =
OFF because it will addslash each variable even if it does not nee=
d to be addslashed. Moreover, some Web applications overlook this option, s=
o some variables could be addslashed twice, resulting in corrupted data.
The allow_url_include
directive is used to allow to include=
any file via the require
and include
statements,=
even if it does not come from your Web server. This option must be set to =
OFF, because if one application on your web server suffers=
of "include vulnerability", users will be able to include any file from an=
y server and those will be executed on your own server.
PHP's Safe Mode is deprecated in the latest version of PHP, and = should not be used anymore. For PrestaShop in particular, having t= he Safe Mode enabled can render your payment modules useless.
In short, it is highly recommended to have the followin= g directives set to the indicated values:
regist= er_globals =3D Off magic_quotes_gpc =3D Off allow_url_include =3D Off safe_mode =3D Off safe_mode_gid =3D Off=20
MySQL often has an administrator account as default ("root", "admin", ..= .), which gives access to all of the databases' content, no matter who the = database is managed by. The administrator has all the rights, and can do ev= ery possible action. You therefore need to safekeep your databases, so as t= o prevent your web applications from succumbing to SQL injections (which ca= n happen when a user succeeds in obtaining the admin password, read http://en.wikipedia.org/wiki/SQL_injection).
If you just installed MySQL, do add a password for the root account, whi= ch has no password as default.
Each time you install a new web application on your server, you must cre= ate a new MySQL user when just the necessary rights to handle that applicat= ion's data. Do NOT use the same username to handle the databases for all of= your installed web applications.
Thus, if you have access to a master MySQL account that can create other= users, here's how you could do it using the command line:
mysql -= u USERNAME -p PASSWORD=20
You could also use the following SQL query:
mysql&g= t; USE mysql; mysql> CREATE USER 'username'@'servername' IDENTIFIED BY 'new_password';=20
Note that your host might give you access to an online tool to do MySQL = administration tasks more easily, such as cPanel. Do use that, since you pr= obably won't have access to the command line in that case.
Now we have a username with just enough rights to connect to the local d= atabase.
We need to allow this user to use the 'prestashop' database, and configu= re his rights at the same time. Here is a template for the SQL query to do = that:
mysql&g= t; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER > ON 'prestashop'.* TO 'new_user'@'localhost'; mysql> FLUSH PRIVILEGES;=20
We now have one user just for our 'prestashop' database. Remember to do = this for each new web application you add to your server.
You can now install PrestaShop safely.
In order to better protect your PrestaShop install, we need to establish= a basic authentication on the admin directory.
One of the aims of the .htaccess
file is to protect your fo=
lders and all its sub-folders (read http://en.wikipedia.org=
/wiki/Htaccess). It only works on Apache servers, and a few others. Mak=
e sure your web server is Apache before creating a .htaccess
f=
ile.
To achieve basic authentication on your admin folder, we need to add a <=
code>.htaccess file in that folder (for instance, /var/www/pre=
stashop/admin
):
AuthUs= erFile /var/www/.prestashop_admin AuthName "Prestashop Admin Access" AuthType Basic Require valid-user Options -Indexes=20
Explanation:
AuthUserFile
: Shows the path to the file containing allowe=
d users and their passwords. .prestashop_admin
is a text file.=
AuthName
: Defines the message to show when the authenticat=
ion window pops up.AuthType
: Defines the authentication type.Require
: Requires users to log in in order to access the c=
ontent. valid-user
enables multiple users to connect and acces=
s the folder.Options
: Defines the folder's options. -Indexes disables automatic generation of a directory index if no index file is a=
vailable.
Here is a sample content for the .prestashop_admin
file, wi=
th a login and a password:
login1= :$apr1$/wJeliK8$e9OzgRaVL8J8wSsFBXjor1 login2:$apr1$yV65Kqqz$cFt3sV2.Q7hhLRRUJDo5a/=20
This file contains logins and hashed password who are allowed to access =
to the folder.
To hash password, you can use a .htpasswd
f=
ile generator: http://aspirine.org/htpasswd_en.html.
It is strongly recommended to put this file into a directory that is ina=
ccessible to your web applications, so before the /openbase_dir
folder. It prevents .htpasswd
file injection, in case one of=
yours web applications is vulnerable.
It is also possible to perform IP and domain restrictions using your
Order = Allow, Deny Deny from all Allow from .myprestashop.com Allow from 127.0.0.1=20
However, you should not put this kind of directive:
<LI= MIT GET POST> Require valid-user </LIMIT>=20
The recommendations below are sorted by order of importance:
/admin
folder after the PrestaShop installatio=
n. This is a must, and you actually cannot access your PrestaShop administr=
ation if you haven't performed that change. Make sure to pick a really uniq=
ue name, ideally a mix of letter and number, such as "my4dm1n"..htaccess
and .ht=
passwd
files, or ask your web host to do it for you.Pick a complex password, by mixing letters, numbers and even punctua= tion marks, such as "5r3XaDR#". You can and should use a password generator= , such as Symantec's (http://www.pctools.com/guides/passw= ord/) or GRC's (https://www.grc.com/passwords.htm).
Safer than a password: you can use a passphrase. Not only is a passphras= e easier to remember, but it is also much harder to crack, even when the ha= cker is using automatic tools (brute force attack or dictionary attack).
A passphrase only needs to be long and easy to remember for you. Any pop=
ular saying should do ("Don=E2=80=99t Throw the Baby Out with the Bathwater=
"), but an absurd phrase will have even less risk of being discovered by a =
hacker. For instance, "Many reckless drivers=
confuse tractor
There are some good passphrase generators online, which help you get a u= nique phrase for you only. For instance: http://passphra.se/ or http://www.fourmilab.ch/javascrypt/pass_phrase.html= a>.
PrestaShop's passwords are not limited in either number of characters or= types of characters.
/install
folder after having installed o=
r updated PrestaShopreadme_xx.txt
files.CHANGELOG
file./docs
folder.Forbid access to your theme's files/templates, using a .htacce=
ss
file with the following content:
<Fi= lesMatch "\.tpl$"> order deny,allow deny from all </FilesMatch>=20
Your applications' PHP code is the only vulnerable path to your server. = It is therefore strongly recommended to always update your server's applica= tions: PHP, MySQL, Apache and any other application on which your website r= uns.
This section will help you better understand configuration variables tha= n are not handled using the back-office, but directly in configuration file= s.
There are four configuration files in PrestaShop, all in the /conf=
ig
folder:
config.inc.php
: core configuration file for PrestaShop.
defines.inc.php
: contains all of PrestaShop constant value=
s. Previously defined in settings.inc.php
.settings.inc.php
: contains the access information to the d=
atabase, as well as the PrestaShop version number.smarty.config.inc.php
: contains all configuration settings=
pertaining to Smarty, the template/theme engine used by PrestaShop.Most of the variables in this file are set during PrestaShop's installat= ion, and should not be edited manually. Change this file at your own risk.<= /p>
In production mode, make sure that define('_PS_MODE_DEV_', false);=
is indeed set to false
.
In order to put PrestaShop =
into debug/test mode, and thus trace errors and mistake more easily, set false
to true
.
You can also enable the code profiling tool, which displays a lot of inf=
ormation at the bottom of every page: set the define('_PS_DEBUG_PROFI=
LING_', false);
line to true
, then open front-office or=
back-office page. At the bottom of it, you will find a summary of the page=
loading performances. Note that you should really disable your store, so t=
hat visitors cannot see this information.
Among other constant values, this file contains the location for all fil= es and folders. If you need these changed, do not forget to keep the origin= al at hand, in case you wish to go back to the original path.
$smarty->caching =3D false;
: Smarty's cache system must=
be disabled because it is not compatible with PrestaShop.$smarty->force=
_compile
must be set to "false", as it will give a 30% improvement o=
n page load time. On the other hand, when editing a .tpl
file,=
you will have to delete the content of the /tools/smarty/compile folder (except index.php
) in order to see the changes live=
. Note that this setting can also be done in the back-office, in the "Advan=
ced parameters" > "Performance" page, in the "Smarty" section.
$smarty->compile_check
should be left to "false".$smarty->debugging
gives you access to Smarty's debuggi=
ng information when your pages are displayed.Here are a few tips that should enable you to optimize PrestaShop.
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 me=
ans "operation code", and defines the compiled state of the dynamic files, =
which can then be processed faster.
PrestaShop is compatible with eAccel=
erator (http://eaccelerator.net/) as well as the new OPcache feature=
from PHP 5.5.0: http://www.php.net/manual/en/intr=
o.opcache.php.
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.
See this page for a performance c=
omparison: http://www.perco=
na.com/doc/percona-server/5.5/feature_comparison.html
If possible, split your static elements between different domains and su=
b-domains, in order to get parallel HTTP connections. To put that in place,=
open the /config/defines.inc.php
file and add these lines (ad=
apted to your needs):
if ( $_S= ERVER['REMOTE_ADDR'] !=3D '127.0.0.1' ) { define( '_THEME_IMG_DIR_', 'http://img2.xxx.com/' ); define( '_THEME_CSS_DIR_', 'http://css.xxx.com/' ); define( '_THEME_JS_DIR_', 'http://js.xxx.com/' ); define( '_THEME_CAT_DIR_', 'http://img1.xxx.com/c/' ); define( '_THEME_PROD_DIR_', 'http://img1.xxx.com/p/' );=20 define( '_THEME_MANU_DIR_', 'http://img1.xxx.com/m/' );=20 define( '_PS_IMG_', 'http://img1.xxx.com/' );=20 define( '_PS_ADMIN_IMG_', 'http://img1.xxx.com/admin/' );=20 } else {=20 define( '_THEME_IMG_DIR_', _THEMES_DIR_ . _THEME_NAME_ . '/img/' );=20 define( '_THEME_CSS_DIR_', _THEMES_DIR_ . _THEME_NAME_ . '/css/' );=20 define( '_THEME_JS_DIR_', _THEMES_DIR_ . _THEME_NAME_ . '/js/' );=20 define( '_THEME_CAT_DIR_', __PS_BASE_URI__ . 'img/c/' );=20 define( '_THEME_PROD_DIR_', __PS_BASE_URI__ . 'img/p/' );=20 define( '_THEME_MANU_DIR_', __PS_BASE_URI__ . 'img/m/' );=20 define( '_PS_IMG_', __PS_BASE_URI__ . 'img/' );=20 define( '_PS_ADMIN_IMG_', _PS_IMG_.'admin/' );=20 }=20
A list of tips & tricks is also available on our site:
Most of the server instructions in this page pertain to the Apache web s= erver. But some of you might prefer to rely on the Nginx web server. Presta= Shop works well with Nginx, but is not able to generate the correct redirec= tion rules for its Friendly URLs.
Here are the direction you should put in your nginx.conf
fi=
le in order to make friendly URLs work:
location= /PRESTASHOP_FOLDER/ { index /PRESTASHOP_FOLDER/index.php; rewrite ^/PRESTASHOP_FOLDER/api/?(.*)$ /PRESTASHOP_FOLDER/webservice/disp= atcher.php?url=3D$1 last; rewrite ^/PRESTASHOP_FOLDER/([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$= /PRESTASHOP_FOLDER/img/p/$1/$1$2.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-= ]*.jpg$ /PRESTASHOP_FOLDER/img/p/$1/$2/$1$2$3.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-z= A-Z0-9-]*.jpg$ /PRESTASHOP_FOLDER/img/p/$1/$2/$3/$1$2$3$4.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)= ?/[_a-zA-Z0-9-]*.jpg$ /PRESTASHOP_FOLDER/img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg l= ast; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z= 0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /PRESTASHOP_FOLDER/img/p/$1/$2/$3/$4/$5/$1$2$3= $4$5$6.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[= _a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /PRESTASHOP_FOLDER/img/p/$1/$2/$3/$4/$5= /$6/$1$2$3$4$5$6$7.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0= -9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /PRESTASHOP_FOLDER/img/p/$1/$2/$= 3/$4/$5/$6 /$7/$1$2$3$4$5$6$7$8.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0= -9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /PRESTASHOP_FOLDER/img/p/= $1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6$7$8$9.jpg last; rewrite ^/PRESTASHOP_FOLDER/c/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jp= g$ /PRESTASHOP_FOLDER/img/c/$1$2.jpg last; rewrite ^/PRESTASHOP_FOLDER/c/([a-zA-Z-]+)/[a-zA-Z0-9-]+.jpg$ /PRESTASHOP= _FOLDER/img/c/$1.jpg last; rewrite ^/PRESTASHOP_FOLDER/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$= /PRESTASHOP_FOLDER/img/c/$1$2.jpg last; try_files $uri $uri/ /PRESTASHOP_FOLDER/index.php?$args; }=20
Note that this example uses /PRESTASHOP_FOLDER/
as the mark=
er for PrestaShop folder. You must replace all instances of /PRESTASH=
OP_FOLDER/
by the correct path to your installation of PrestaShop.=
p>
For instance, if PrestaShop is at the root of your of your server, repla=
ce /PRESTASHOP_FOLDER/
with simply /
:
location= / { index /index.php; rewrite ^/api/?(.*)$ /webservice/dispatcher.php?url=3D$1 last; rewrite ^/([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$1$2.jp= g last; rewrite ^/([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/= $2/$1$2$3.jpg last; rewrite ^/([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /im= g/p/$1/$2/$3/$1$2$3$4.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0-9-]*.j= pg$ /img/p/$1/$2/$3/$4/$1$2$3$4$5.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_a-zA-Z0= -9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$1$2$3$4$5$6.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-]*)?/[_= a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$1$2$3$4$5$6$7.jpg last; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-zA-Z0-9-= ]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$1$2$3$4$5$6$7$8.jpg l= ast; rewrite ^/([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])([0-9])(-[_a-z= A-Z0-9-]*)?/[_a-zA-Z0-9-]*.jpg$ /img/p/$1/$2/$3/$4/$5/$6/$7/$8/$1$2$3$4$5$6= $7$8$9.jpg last; rewrite ^/c/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg= last; rewrite ^/c/([a-zA-Z-]+)/[a-zA-Z0-9-]+.jpg$ /img/c/$1.jpg last; rewrite ^/([0-9]+)(-[_a-zA-Z0-9-]*)/[_a-zA-Z0-9-]*.jpg$ /img/c/$1$2.jpg l= ast; try_files $uri $uri/ /index.php?$args; }=20
If your installation of PrestaShop is using the multistore mode, you nee= d to add a few lines for each store. For instance, if one of your stores is= called "high-tech":
location= /PRESTASHOP_FOLDER/high-tech/ { rewrite ^/PRESTASHOP_FOLDER/high-tech/(.*)$ /PRESTASHOP_FOLDER/$1 last; try_files $uri $uri/ /PRESTASHOP_FOLDER/index.php?$args; }=20
The PrestaShop developers have done their best to clearly and intuitivel= y separate the various parts of the software.
Here is how the files are organized:
/admin
: contains all the PrestaShop files pertaining to th=
e back-office. When accessing this folder with your browser, you will be as=
ked to provide proper identification, for security reasons. Importa=
nt: you should make sure to protect that folder with a .htac=
cess
or .htpasswd
file!/cache
: contains temporary folders that are generated and =
re-used in order to alleviate the server's load./classes
: contains all the files pertaining to PrestaShop'=
s object model. Each file represents (and contains) a PHP class, and its me=
thods/properties./config
: contains all of PrestaShop's configuration files.=
Unless asked to, you should never edit them, as they are =
directly handled by PrestaShop's installer and back-office./controllers
: contains all the files pertaining to PrestaS=
hop controllers =E2=80=93 as in Model-View-Controller (or MVC), the softwar=
e architecture used by PrestaShop. Each file controls a specific part of Pr=
estaShop./css
: contains all CSS files that are not attached to them=
es =E2=80=93 hence, these are mostly used by the PrestaShop back-office.
/docs
: contains some documentation. Note:=
it should be deleted in a production environment./download
: contains your digital products, which can be do=
wnloaded: PDFs, MP3s, etc./img
: contains all of PrestaShop's default images, icons a=
nd picture files =E2=80=93 that, those that do not belong to the theme. Thi=
s is where you can find the pictures for product categories (/c
sub-folder, those for the products (/p
sub-folder) and those=
for the back-office itself (/admin
sub-folder)./install
: contains all the files related to PrestaShop's i=
nstaller. You will be required to delete it after installation, in order to=
increase security./js
: contains all JavaScript files that are not attached t=
o themes. Most of them belong to the back-office. This is also where you wi=
ll find the jQuery framework./localization
: contains all of PrestaShop's localization f=
iles =E2=80=93 that is, files that contain local information, such as curre=
ncy, language, tax rules and tax rules groups, states and the various units=
in use in the chosen country (i.e., volume in liter, weight in kilograms, =
etc.)./log
: contains the log files generated by PrestaShop at va=
rious stages, for instance during the installation process./mails
: contains all HTML and text files related to e-mail=
s sent by PrestaShop. Each language has its specific folder, where you can =
manually edit their content if you wish./modules
: contains all of PrestaShop's modules, each in it=
s own folder. If you wish to definitely remove a module, first uninstall it=
from the back-office, then only can you delete its folder./override
: this is a special folder that appeared with Pre=
staShop 1.4. By using PrestaShop's regular folder/filename convention, it i=
s possible to create files that override PrestaShop's default classes or co=
ntrollers. This enables you to change PrestaShop core behavior without touc=
hing to the original files, keeping them safe for the next update./pdf
: contains all the template files (.tpl
) =
pertaining to the PDF file generation (invoice, delivery slips, etc.). Chan=
ge these files in order to change the look of the PDF files that PrestaShop=
generates./themes
: contains all the currently-installed themes, each=
in its own folder./tools
: contains external tools that were integrated into =
PrestaShop. For instance, this were you'll find Smarty (template/theme engi=
ne), FPDF (PDF file generator), Swift (mail sender), PEAR XML Parser (PHP t=
ool)./translations
: contains a sub-folder for each available la=
nguage. However, if you wish to change the translation, you must do so usin=
g the PrestaShop internal tool, and not edit them directly=
in this folder./upload
: contains the files that would be uploaded by clie=
nts for customizable products (for instance, a picture that a client wants =
printed on a mug)./webservice
: contains files that enable third-party applic=
ations to access PrestaShop through its API.A PrestaShop installation does seldom remain at the same physical place.= There are many reasons why you would need to move your PrestaShop files an= d data around:
In all of these circumstances, you must be careful to properly move both= all of your files (including the custom images, your themes, the modules y= ou bought...) and all your data (which is contained in your MySQL database)= .
Here are the main steps when changing servers, or copying from your loca= l hard-drive to your online server:
/config/settings.inc.php
file a=
nd 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_');
i=
ndex.php
files in the following folders:
/cache/smarty/cache
/cache/smarty/compile
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 wor= king as expected.
Here are the main steps when moving PrestaShop to a new domain within th= e same server. These are mostly a simpler version of the above steps =E2=80= =93 we do not touch the data, which stays on the same MySQL server.
/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_');
i=
ndex.php
files in the following folders:
/tools/smarty/cache
/tools/smarty/compile
/tools/smarty_v2/cache
/tools/smarty_v2/compile
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 wor= king as expected.