SPACE.LA
◀ music select
personal / tool / archived

cPanel Import

A PHP script that imports cPanel account backups onto a plain LAMP server without cPanel: it creates users and groups, Apache vhosts, log directories and MySQL databases and users, and moves the home directory. Written in 2011 while moving hosting accounts off cPanel.

BPM
177
GRADE
B
LEVEL
6
RELEASES
0
YEARS
2011–2011

Off cPanel In Four Days

In August 2011 I was moving hosting accounts off cPanel and onto plain LAMP boxes, and doing it by hand once was enough. So I wrote a root-level PHP script that takes a cPanel backup tarball and unpacks it onto a server without cPanel: creates the user and assigns a group, writes the Apache vhost and symlinks it into the active set, makes the log directories, creates the MySQL databases and users, and moves the whole home directory across. There are flags for a different username, a new password, the IP to bind, the MySQL super user, source, destination, and a list of things to ignore.

I wrote it between August 1st and August 4th, used it for the migration, and then put it away.

led to

history

  1. archived