back to

Import lists from command line



is there any way to import lists via command line?

i have tried:

./bin/phplist -pimport

but i get only this…

phpList version 3.3.1 © 2000-2018 phpList Ltd,
Usage: /var/www/html/lists/admin/index.php -p page [other parameters]




@PetePot There must be something wrong with your phplist shell script because the command works for me.

php /home/duncan/www/lists/admin/index.php -p import -f /home/duncan/Downloads/import.csv -c /home/duncan/Development/PHP/phplist/config.php -l 1

But it then fails.

Error: Invalid security token, please reload the page and try again

Instead you can try the Subscribers plugin, to which I have added a command line page that uses the core phplist processing, see


Thanks a lot Duncan… i will try it with your plugin script!! is it possible to set the list-name those emails should belong to?


@PetePot You need to specify the id of the list in the command. That is explained in the documentation page.


sorry but I do not see the script, am I missing something. Thanks


I was able to make it work.