Is it possible to automate staging site drop and recreate from live?

jjthornton

Registered
Sep 22, 2020
2
0
1
Spain
cPanel Access Level
Root Administrator
Hi,

I could not find anything related to my issue, so apologies if I have missed it.

I have a site that is being updated with some regularity by the client, who updates articles on the live system (Wordpress). Can anyone tell me if it is possible to drop a staging site and recreate it in an automated way, like once a week? Alternatively, if such a thing is possible using UAPI or similar that would enable a script to be created which could do this?

I really appreciate any pointers that folks may have.

Kind regards,
jj :)
 

andrew.n

Well-Known Member
Jun 9, 2020
982
363
63
EU
cPanel Access Level
Root Administrator
cPanel doesn't have such functions. Making cPanel backups regularly and creating staging site/account is an option or you can have a staging site on a separate account where the files and databases are being copied regularly with rsync for example. All these requires custom scrips and dev work.
 

jjthornton

Registered
Sep 22, 2020
2
0
1
Spain
cPanel Access Level
Root Administrator
Hi andrew.n,

Thank you so much for the response. I thought that the creation of staging sites is part of the default cPanel commands and as such may be easily called from a command. I will investigate custom scripts as you have mentioned. I am just looking for a starting point as I am new to working with cPanel.

Wishing you a wonderful day.

Kind regards.