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:

Result:

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.

Subscribe
Notify of

63 Comments
Inline Feedbacks
View all comments
Tim
8 years ago

Is there a script for paper_latern theme? Your solution is great, but works only on X3 theme.

Priyanka
8 years ago

Thanks a lot for the solution on Cpanel auto back up.

raju
8 years ago

Hi,

Another issue when we try if cpanel password contain (+) character it also not working. It say fail to authenticate.

8 years ago
Reply to  raju

On line 40 of: https://github.com/Xeroday/cPanel-Auto-Backup/blob/master/index.html

Change

$params

To

curl_escape ( $params )

Bryce
8 years ago

Doesn’t work for me either.

Brandon
8 years ago

Not working for me either on Hostgator cPanel as of December 30th, 2015.

Gregory
8 years ago

Hey! Thanks for your script.

This not working anymore in Host Gator from 12/29/2015.

The file is not more up to FTP, this remaining in the same directory

Bruce
9 years ago

What I love about this script is that you don’t even need to put it on the server you’re backing up. You can add it to the cron jobs of a completely different server and it still works.

Really helpful, thanks!

Srinath
9 years ago

Thanks for the Perfect code.

I would recommend if anyone using this site… ensure… you give incorrect password and generate PHP code later you can change password in the PHP program.

Thanks.

Poom
1 year ago
Reply to  Srinath

Office Syndrome Massage is a type of therapeutic massage designed to address the specific physical and mental health issues associated with working in an office or desk job.