This page describes how to set up a development environment to work on the phpList core code, the phpList plugins and/or the phpList themes.
The system will use docker, which is expected to be set up and working. This page is not to help with setting up docker.
Clone the repository https://github.com/phplist/phplist-docker somewhere on your machine
Edit the file .env in the folder where you checked it out, or create a new one from the example that is in the repository.
The README in the repository explains how to set up a working phpList with an empty database. However, here we do not use that, we use a pre-populated database instead.
Therefore not all options in the .env file apply for the development environment setup.
The ones we need are
PORT=8000 HOSTNAME=localhost THEME_DEV_PATH=/home/yourhome/Projects/phpListThemes CODE_PATH=/home/yourhome/Projects/phpList3/public_html/ PLUGIN_DEV_PATH=/home/yourhome/Projects/phpListPlugins
Explanation of the above config variables:
the PORT where you will be loading phpList
the hostname to connect to
The location on your local machine where you are working on the themes for phpList. You should checkout all the themes as sub-folders in this location. For example:
/home/yourhome/Projects/phpListThemes /home/yourhome/Projects/phpListThemes/dressprow /home/yourhome/Projects/phpListThemes/phplist-ui-bootlist /home/yourhome/Projects/phpListThemes/phplist-ui-funkytheme
The location on your local machine where you have your clone of the phpList3 code checked out. As you can tell, it should point to the public_html folder in the phpList repository.
The location on your local machine where you have the plugin repositories checked out. Similar to the themes, this needs to be one main folder that has the plugins checked out as sub-folders, for example
You can checkout the root of the plugins here, so the full structure would be:
Please note: you need to have at least the phpList core code checked out. The themes and plugins are optional, but without at least one theme, it will be difficult to work with it. If you check out one theme, it will be used, if you check out more, you will be able to switch themes in the settings page.
===== Start and Stop =====
Once you have it set up and configured, you can run
to start phpList. After a little while, it will be available on http://localhost:8000 if you keep the above example.
The data will be a sanitised dataset with a nice amount of data in a lot of places, which should help with development.
The login for the dev system is “admin” with password “phplist”.
The Queue processing will be automatic, and all emails are sent to the mailhost container.
To stop the system, run
and the containers will be removed.