PrestaShop recommended server requirements and PHP settings

PrestaShop server settings are vital part of properly working PrestaShop store. Not every PrestaShop user is a system administrator and knows how to properly configure and set up their PrestaShop stores, but don’t worry, we will cover this in this article.

PrestaShop needs the following server configuration in order to run:

  • System: Unix, Linux or Windows. Web server: Apache Web Server 2.2 or any later version.
  • PHP: We recommend PHP 7.1 or later. See the compatibility chart below for more details.
  • MySQL: 5.0 minimum, 5.6 or later recommended. Server
  • RAM: The more the better. We recommend setting the memory allocation per script (memory_limit) to a minimum of 256M.

Further more, PrestaShop can also work with NGINX 1.0 or later, although we don’t recommend it as there are known bugs and problems with it, and very few users actually use it.

PrestaShop PHP requirements

PHP compatibility chart

PrestaShop needs a few additions to PHP and MySQL in order to fully work. Make sure that your PHP configuration has the following extensions and settings configured:

PrestaShop PHP Compatibility chart

PrestaShop needs a few additions to PHP and MySQL in order to fully work. Make sure that your PHP configuration has the following extensions and settings configured:

PrestaShop PHP Extensions

  • CURL. The Client URL extension is used to download remote resources like modules and localization packages.
  • DOM. The DOM extension is needed to parse XML documents. PrestaShop uses it for various functionalities, like the Store Locator. It is also used by some modules, as well as the pear_xml_parse library.
  • Fileinfo. The File information extension is used to find out the file type of uploaded files.
  • GD. The GD extension is used to create thumbnails for the images that you upload.
  • Intl. The Internationalization extension is used to display localized data, such as amounts in different currencies.
  • Zip. The Zip extension is used to expand compressed files such as modules and localization packages.

PrestaShop PHP.ini Settings

  • allow_url_fopen enabled. This directive enables PrestaShop to access remote files, which is an essential part of the payment process, among others things. It is therefore imperative to have it set to On.
  • magic_quotes_gpc = off
  • memory_limit = 512M The more memory you have the better, but 512MB should be fine in most cases for PrestaShop, however if you have large database with many products and heavy traffic, it would need more.
  • max_input_time = 300
  • upload_max_filesize = 50M Controls the upload maximum file size.
  • post_max_size = 50M Maximum data size allowed to uploaded, in megabytes.
  • max_input_vars = 30000 You need this to be large as this is needed especially when you are editing products or translations, and your server can timeout if yo don’t have enough.
  • mod_rewrite = installed and activated
  • mod_security = off
  • date.timezone You should also include it
  • JSON = ON
  • ctype = ON
  • cURL – Some services like payment modules may need it.
  • allow_url_fopen = on

PrestaShop Example PHP.ini file

register_globals = off
display_errors = Off
magic_quotes_gpc = Off
log_errors = On
error_log  myerrorlog.log
error_reporting "E_ALL & ~E_NOTICE"
memory_limit = 256M
max_execution_time = 300;
max_input_time = -1
max_input_vars = 30000
suhosin.get.max_vars = 30000; = 30000;
upload_max_filesize = 50M;
post_max_size = 50M;
allow_url_fopen = On
allow_url_include = Off
short_open_tag = off
realpath_cache_size  5M
always_populate_raw_post_data -1
cgi.force_redirect  "on"
safe_mode  Off
expose_php Off
output_buffering  4096

Note: You should consult your hosting provider about those settings, what they allow and how it is best to implement them.

File and folder settings permissions

In order to work properly, you should set your PrestaShop server settings about files and folders permissions need to be set correctly, otherwise you may get error in certain functions.

Folders should be set with chmod permission: 0755. Files should be set with chmod permission: 0644.

Note: As usual, make sure to backup any folder, file or setting that you change before do any changes.

Sources: PrestaShop Docs


Please enter your comment!
Please enter your name here

Must Read

PrestaShop vs WooCommerce: Practical comparison

Many of my acquaintances and friends ask me if they should use WooCommerce instead of PrestaShop for their store.