How to Install phpList on macOS
phpList is an open source software which allows you to manage email lists, create and send newsletters and track the success of your email campaigns. In this tutorial, we'll guide you through the steps required to install phpList on a macOS environment.
Prerequisites
- Latest version of macOS with administrative privileges
- Web server software installed such as Apache or Nginx
- PHP 7.4 or later
- MySQL 5.5 or later
Steps
Download the latest version of phpList from the official website https://www.phplist.com/.
Extract the contents of the downloaded archive to your web root directory. This can be
/var/www/html/or any other directory that you have configured as your web root.Rename the extracted directory to
phplist. You can use the following command in the terminal to rename the directory:mv phplist-*.zip phplistConfigure the database settings in the
config/config.phpfile. Set the following parameters as per your database details:define('PHPLIST_DB_HOST', 'localhost'); define('PHPLIST_DB_NAME', 'your_database_name'); define('PHPLIST_DB_USER', 'your_database_user'); define('PHPLIST_DB_PASS', 'your_database_password');Import the
structure.sqlanddummies.sqlfiles into your database. You can do this using a tool such as phpMyAdmin or the command line. Run the following commands in the terminal:mysql -u your_database_user -p your_database_name < phplist/sql/structure.sql mysql -u your_database_user -p your_database_name < phplist/sql/dummies.sqlChange the ownership of the
listsdirectory to the user that your web server software runs as. This is usuallywww-dataon Apache ornginxon Nginx. You can use the following command in the terminal:sudo chown -R www-data:www-data phplist/listsSet the appropriate permissions on the
lists/config.phpfile to prevent unauthorized access to your configuration settings. You can use the following command in the terminal:sudo chmod 640 phplist/lists/config.phpRestart your web server to apply the changes. You can use the following command in the terminal to restart Apache:
sudo apachectl restartor the following command to restart Nginx:
sudo systemctl restart nginxAccess your phpList installation by navigating to
http://localhost/phplistin your web browser. Follow the setup wizard to complete the installation.
Congratulations, you have successfully installed phpList on macOS!