Notice: You are browsing the documentation for PrestaShop 9, which is currently in development.
You might want to read the documentation for the current version, PrestaShop 8. Read the current version of this page
If you’re reading this, thank you! This means you’re interested in contributing to PrestaShop. You probably are a PrestaShop developer, and your use of the project is slightly different from ours. For instance, there are few differences between a PrestaShop zip release package and the GitHub repository. This is because the release package is a build, whereas the GitHub repository contains the sources.
To be able to contribute you need:
In this part, we’ll run PrestaShop by setting up a localhost environment on your machine. Your machine needs:
Please read the system requirements to check that your machine can run PrestaShop.
Installing any web-application locally requires that you first install the adequate environment, namely the Apache web server, the PHP language interpreter, the MySQL database server, and ideally the phpMyAdmin tool. This is called an *AMP package: Apache+MySQL+PHP and the operating system, giving WAMP (Windows+Apache+MySQL+PHP), MAMP (Mac OS X+…) and LAMP (Linux+…). Since all of the items packaged are open-source, these installers are most of the time free.
Here is a selection of free AMP installers:
Open the phpMyAdmin tool using your browser. Its location depends on the AMP pack you chose:
In the “Databases” tab, indicate the database name you want and validate by clicking on the “Create a database” button.
To install the source code, you need to fork the PrestaShop repository. A fork is a copy of the original project on GitHub. If you don’t know what is a fork or how to fork a project on GitHub, you can follow the GitHub tutorial.
Once you have forked the project, you need to download it to your computer.
For instance, if your GitHub nickname is preston
, this is what you should do in your terminal:
git clone https://github.com/preston/PrestaShop.git
Clone the repository inside the document folder of the AMP installer you chose:
C:\xampp\htdocs
or /Applications/xampp/htdocs
C:\wamp\www
C:\easyphp\www
/Applications/MAMP/htdocs/
Use composer to download the project’s dependencies:
cd /path/to/prestashop
composer install
Static assets are not present in the repository and need to be compiled (we explained why in this article).
You will need npm
installed on your environment (here is the documentation about how to compile assets), then you can simply run:
cd /path/to/prestashop
make assets
PrestaShop needs recursive write permissions on several directories:
To ease up your life on a development environment, we suggest to either:
chown
all PrestaShop files to “youruser:_www”.Open the PrestaShop installer and follow its instructions.
The installer can be run from your browser, if you browse http://127.0.0.1/prestashop/install-dev
You can read the Getting Started guide for more details.
That’s it! You have now a running shop on localhost!
The very first step to create a pull request is to create your own git branch.
Let’s say you want to suggest a new feature, like emoticon support everywhere. A correct name for your git branch could be “add-emoticons-support”:
git checkout -b "add-emoticons-support"
Then you can start to do changes on PrestaShop Core, and create commits: Yay!