How to Install phpList on Ubuntu Server

phpList is open-source software for managing email campaigns. To install phpList on your Ubuntu Server, you can follow the steps below.

  1. Update and upgrade your Ubuntu packages:
sudo apt-get update
sudo apt-get upgrade
  1. Install LAMP stack (Apache, MySQL/MariaDB, PHP) using the following command:
sudo apt-get install apache2 mysql-server php libapache2-mod-php php-mysql php-mbstring php-xml
  1. Next, you need to create a database for phpList. To do so, run:
sudo mysql -u root -p

Enter your MySQL root password, and then run the following commands:

CREATE DATABASE phplist;
GRANT ALL PRIVILEGES ON phplist.* TO 'phplist'@'localhost' IDENTIFIED BY 'PASSWORD';
FLUSH PRIVILEGES;
exit

Note: Replace 'PASSWORD' with your preferred password.

  1. Download the latest version of phplist from https://www.phplist.com/download-phplist and extract the files to the /var/www/html directory:
cd /tmp
wget https://phplist.org/latest.zip
unzip latest.zip -d /var/www/html/
  1. Change the ownership of the /var/www/html/phplist directory to the Apache user:
sudo chown -R www-data:www-data /var/www/html/phplist/
  1. Now navigate to the phplist directory:
cd /var/www/html/phplist/
  1. Copy the config-sample.php file to config.php:
cp config/config.sample.php config/config.php
  1. Edit the config.php file using your preferred text editor:
sudo nano config/config.php
  1. Update the database settings in the config.php file as follows:
$config['database_host'] = 'localhost';
$config['database_name'] = 'phplist';
$config['database_user'] = 'phplist';
$config['database_password'] = 'PASSWORD';

Note: Replace 'PASSWORD' with the password you set for 'phplist' user in Step 3.

  1. Save and close the file.

  2. Set the proper permissions for the cache and attachment directories:

sudo chown www-data:www-data lists/config/ && sudo chmod 755 lists/config/
sudo chown www-data:www-data upload/ && sudo chmod 755 upload/
  1. Restart Apache:
sudo systemctl restart apache2
  1. Finally, navigate to the phplist website in your web browser:
http://YOUR_DOMAIN_NAME_OR_IP_ADDRESS/phplist/

Follow the on-screen instructions to install and setup phplist.

That's it! You have successfully installed phplist on your Ubuntu Server.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!