Here’s the full tutorial on creating automated cPanel backups. Use this form to generate a PHP backup script that creates a cPanel backup.

If you’d like the raw code instead of filling out the form below, visit the Github repo.

To enable automatic uploads of backups to an FTP server, fill out the FTP form fields. If you wish to disable the remote FTP upload feature, simply leave the FTP server field blank and your backups will be saved in your home directory on the cPanel server (the default location).

Your cPanel URL (?):
cPanel username:
cPanel password:
FTP Server:
FTP Username:
FTP Password:
FTP Port:
FTP Directory:


The source code for this script generator can be found on my Github. The PHP code is an upgraded/updated version of this original script from 2006.

Leave a Reply

49 Comments on "cPanel Auto Backup Script Generator"

Don’t fill anything…with TRUE credentials…please modify your script after the auto generated file.

Well done..great script !!!!!

I was keen to use this. Unfortunately CPanel on my hosting account has a security token built into the URL. Something like,

I have older Cpanel accounts which do not use this cpsess### token.

Does this mean I won’t be able to use your script?



Hi, skip the token part like this:

This will work…

Thanks. Worked fine for me. Thanks for sharing the script and the solution!

Same issue here. Any solution?

Same issue here again. Any pointers for a solution? This script is exactly what I was looking for.

[…] to Unblock Mozilla Firefox Browser? Click “Start,” Menu. Click on “Control Panel“. Go to “System Security.” Click the “Allow a Program through Windows […]

1 3 4 5