Usage & Enterprise Capabilities
phpList is a legacy, yet highly reliable, open-source email marketing software designed for creating, sending, and managing large-scale newsletter campaigns. Written in PHP and using a MySQL/MariaDB database, it has been a staple in the open-source community for nearly two decades, known for its ability to handle immense subscriber lists (millions of contacts) on incredibly modest hardware.
Unlike modern SaaS email platforms that charge by the number of subscribers, hosting phpList on your own infrastructure allows you to scale your email marketing at a fraction of the cost, paying only for the underlying server and the usage-based cost of an SMTP relay (like Amazon SES or Postmark).
In production, phpList relies heavily on proper cron job configuration to queue, throttle, and send batches of emails smoothly without overwhelming the server or triggering spam filters at major ISPs (Gmail, Yahoo).
Key Benefits
Cost-Effective Scaling: Send millions of emails without per-subscriber pricing constraints.
Data Sovereignty: Complete ownership of your subscriber data, crucial for GDPR and CCPA compliance.
Robust Throttling: Highly configurable send speeds ensure you stay within your email provider's rate limits and maintain a healthy domain reputation.
Advanced Segmentation: Create granular subscriber segments based on custom attributes (e.g., location, sign-up date, past engagement) for targeted campaigns.
Production Architecture Overview
A production phpList environment is a standard LAMP/LEMP stack application consisting of:
Web Server: Nginx or Apache handling the administrative interface and public subscription pages.
Application Logic (PHP): The core phpList application software executing via PHP-FPM.
Database (MariaDB/MySQL): Stores subscriber data, campaign history, bounce logs, and tracking metrics.
Background Worker (Cron): Scheduled tasks that process the message queue and handle bounce reconciliation asynchronously.
SMTP Gateway: An external transactional email provider (Amazon SES, SendGrid) to actually deliver the messages over the internet reliably.
Implementation Blueprint
Implementation Blueprint
Prerequisites
Start with a clean Ubuntu server and install the LEMP stack.
sudo apt update && sudo apt upgrade -y
sudo apt install nginx mariadb-server php-fpm php-mysql php-cli php-mbstring php-xml php-curl php-gd unzip -yDatabase Setup
Create a dedicated database and user for phpList.
sudo mysql -u root
CREATE DATABASE phplistdb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'phplistuser'@'localhost' IDENTIFIED BY 'secure_db_password_here';
GRANT ALL PRIVILEGES ON phplistdb.* TO 'phplistuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;Application Installation
Download the latest stable release of phpList 3 into your web root.
cd /tmp
wget https://sourceforge.net/projects/phplist/files/phplist/3.6.14/phplist-3.6.14.zip/download -O phplist.zip
unzip phplist.zip
# Move the 'lists' directory into the web root
sudo mv phplist-*/public_html/lists /var/www/html/phplist
sudo chown -R www-data:www-data /var/www/html/phplist/Configuration
The core configuration file is config.php.
sudo nano /var/www/html/phplist/config/config.phpModify the database connection variables:
$database_host = 'localhost';
$database_name = 'phplistdb';
$database_user = 'phplistuser';
$database_password = 'secure_db_password_here';Crucial Production Setting: SMTP Relay
To ensure deliverability, never send mail directly from the VPS. Route traffic through an SMTP relay. Add these lines to config.php:
define('PHPMAILERHOST', 'email-smtp.us-east-1.amazonaws.com');
define('PHPMAILERPORT', 587);
define('PHPMAILER_SECURE', 'tls');
// define('PHPMAILER_SECURE', 'ssl'); // Alternative if required
$phpmailer_smtpuser = 'your_ses_smtp_username';
$phpmailer_smtppassword = 'your_ses_smtp_password';Configuring Throttling (Rate Limiting) If your Amazon SES account is limited to 14 emails per second, configure phpList to respect this:
// Send at most 3600 emails per batch
define('MAILQUEUE_BATCH_SIZE', 3600);
// Wait 3600 seconds (1 hour) before starting the next batch
define('MAILQUEUE_BATCH_PERIOD', 3600);
// Sleep for 1 second in between messages (1 email/sec max)
define('MAILQUEUE_THROTTLE', 1);Nginx Configuration
Create an Nginx Server Block for the application.
server {
listen 80;
server_name newsletters.mycompany.com;
root /var/www/html/phplist;
index index.php index.html;
location / {
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock; # Adjust PHP version
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# Deny access to internal files
location ~ ^/config/ {
deny all;
}
}Enable the site and reload Nginx:
sudo ln -s /etc/nginx/sites-available/phplist.conf /etc/nginx/sites-enabled/
sudo systemctl reload nginxSetting up Command Line Cron Jobs
In production, you should never process the queue from the web browser. Configure system Cron to run the phpList queue processing script periodically in the background.
sudo crontab -e -u www-dataAdd the following lines to process the queue every 5 minutes, and process bounces every 2 hours:
*/5 * * * * /usr/bin/php /var/www/html/phplist/admin/index.php -p processqueue -c /var/www/html/phplist/config/config.php > /dev/null 2>&1
0 */2 * * * /usr/bin/php /var/www/html/phplist/admin/index.php -p processbounces -c /var/www/html/phplist/config/config.php > /dev/null 2>&1Security and Best Practices
Initialize Database: Complete the setup by accessing
https://newsletters.mycompany.com/adminin your browser and following the database initialization wizard.SSL/TLS: Secure the administrative login and public subscription pages with Let's Encrypt (Certbot).
Domain Authentication: Configure SPF, DKIM, and DMARC DNS records for your sending domain. phpList alone does not guarantee inbox placement; your domain reputation and SMTP provider setup do.
Update Regularly: As a widely deployed PHP application, staying up to date with security patches is critical. Subscribe to the phpList announcements newsletter for update alerts.