Clone a user's install.
The clone can optionally be marked as a stage.
*What is a stage? A stage application is one that is not intended to be seen by the public, and is instead used to test, configure, prototype changes before making those changes public. And when you want to make these changes public you; go to the live application, click its sync button, and select the stage application where the changes were made. The changes will be pulled across to the live site. And while you can sync from any other application of the same type, stages are displayed differently in the user's My Applications tab and you can find the application they were staged from in their settings. Making stages, rather than plain clones, highlights their purpose but otherwise they're no different to a plain clone.
$cpapi=https://{USER}:{PASS}@{SERVER_IP}:2083/3rdparty/installatron/index.cgi? # cpanel
#$cpapi=https://{USER}:{PASS}@{SERVER_IP}:2087/3rdparty/installatron/index.cgi? # whm
#$cpapi=https://{USER}:{PASS}@{SERVER_IP}:2222/CMD_PLUGINS/installatron/index.raw? # directadmin
curl -X POST $cpapi/installs/1234567890abcdefghij12345/clone \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '
{
"url": "http://website.com/staging"
}
'
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data":
{
"id": "1234567890abcdefghij12345",
"application": "wordpress",
"agent": "10.0.0",
"autobk": "schedule",
"autobk_schedule": "1234567890abcdefghij1234567890ab",
"autoup": "minor",
"autoup_backup": "all",
"autoup_plugins": "none",
"autoup_themes": "none",
"bkloc": "local",
"cache_numerrors": 1,
"cache_numwarnings": 0,
"cache_files": 12345678,
"cache_numbackups": 0,
"cache_preview": 12345,
"cache_tables": 123456,
"cache_time": 1234567890,
"db_host": "localhost",
"db_type": "mysql",
"db_name": "databasename",
"db_user": "databaseusername",
"db_pass": "dAtAbAsEpAs5//0rD",
"db_prefix": "wp_",
"login": "admin123",
"email": "admin@website.com",
"language": "en",
"sitetitle": "My blog",
"sitetagline": "Just another WordPress site",
"limitloginattempts": "yes",
"twofactor": "no",
"failures": [],
"file": "/home/useraccountname/.appdata/current/1234567890abcdefghij12345",
"files": [
"index.php",
"license.txt",
".htaccess",
".maintenance",
"readme.html",
"wp-activate.php",
"wp-admin",
"wp-app.php",
"wp-blog-header.php",
"wp-comments-post.php",
"wp-config.php",
"wp-config-local.php",
"wp-config-sample.php",
"wp-content",
"wp-cron.php",
"wp-includes",
"wp-links-opml.php",
"wp-load.php",
"wp-login.php",
"wp-mail.php",
"wp-settings.php",
"wp-signup.php",
"wp-trackback.php",
"xmlrpc.php"
],
"incomplete": true,
"link_admin": "wp-admin",
"notification": [],
"parent": "1234567890abcdefghiparent",
"path": "/home/useraccountname/public_html/staging",
"plugins": [
{
"id": "akismet",
"version": "5.3.6",
"activated": false,
"autoup": "all"
},
{
"id": "limit-login-attempts-reloaded",
"version": "2.26.18",
"activated": true,
"autoup": "all"
}
],
"stage": "1234567890abcdefghijstage",
"tables": [
"wp_commentmeta",
"wp_comments",
"wp_links",
"wp_options",
"wp_postmeta",
"wp_posts",
"wp_term_relationships",
"wp_term_taxonomy",
"wp_termmeta",
"wp_terms",
"wp_usermeta",
"wp_users"
],
"themes": [
{
"id": "twentytwentythree",
"version": "1.6",
"active": false,
"autoup": "all"
},
{
"id": "twentytwentyfive",
"version": "1.1",
"active": false,
"autoup": "all"
}
],
"time_created": 1611356510,
"time_updated": 1647057773,
"title": "My blog stage",
"url": "http://website.com/staging",
"url_domain": "website.com",
"user": "useraccountname",
"version": "6.7.2",
"version_autouped": "6.7.2",
"version_autouped_attempts": 1,
"version_available": "6.7.3",
"version_updates_available": 3
}
}
$cpapi=https://{USER}:{PASS}@{SERVER_IP}:2083/3rdparty/installatron/index.cgi? # cpanel
#$cpapi=https://{USER}:{PASS}@{SERVER_IP}:2087/3rdparty/installatron/index.cgi? # whm
#$cpapi=https://{USER}:{PASS}@{SERVER_IP}:2222/CMD_PLUGINS/installatron/index.raw? # directadmin
curl -X POST $cpapi/installs/1234567890abcdefghij12345/clone \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '
{
"url": "http://website.com/staging",
"db_host": "localhost",
"db_name": "databasename",
"db_user": "databaseusername",
"db_pass": "dAtAbAsEpAs5//0rD",
"db_prefix": "wp_"
}
'
{
"result": true,
"status": 200,
"errcode": null,
"errfield": null,
"message": "The task is complete.\n"
"data":
{
"id": "1234567890abcdefghij12345",
"application": "wordpress",
"agent": "10.0.0",
"autobk": "schedule",
"autobk_schedule": "1234567890abcdefghij1234567890ab",
"autoup": "minor",
"autoup_backup": "all",
"autoup_plugins": "none",
"autoup_themes": "none",
"bkloc": "local",
"cache_numerrors": 1,
"cache_numwarnings": 0,
"cache_files": 12345678,
"cache_numbackups": 0,
"cache_preview": 12345,
"cache_tables": 123456,
"cache_time": 1234567890,
"db_host": "localhost",
"db_type": "mysql",
"db_name": "databasename",
"db_user": "databaseusername",
"db_pass": "dAtAbAsEpAs5//0rD",
"db_prefix": "wp_",
"login": "admin123",
"email": "admin@website.com",
"language": "en",
"sitetitle": "My blog",
"sitetagline": "Just another WordPress site",
"limitloginattempts": "yes",
"twofactor": "no",
"failures": [],
"file": "/home/useraccountname/.appdata/current/1234567890abcdefghij12345",
"files": [
"index.php",
"license.txt",
".htaccess",
".maintenance",
"readme.html",
"wp-activate.php",
"wp-admin",
"wp-app.php",
"wp-blog-header.php",
"wp-comments-post.php",
"wp-config.php",
"wp-config-local.php",
"wp-config-sample.php",
"wp-content",
"wp-cron.php",
"wp-includes",
"wp-links-opml.php",
"wp-load.php",
"wp-login.php",
"wp-mail.php",
"wp-settings.php",
"wp-signup.php",
"wp-trackback.php",
"xmlrpc.php"
],
"incomplete": true,
"link_admin": "wp-admin",
"notification": [],
"parent": "1234567890abcdefghiparent",
"path": "/home/useraccountname/public_html/staging",
"plugins": [
{
"id": "akismet",
"version": "5.3.6",
"activated": false,
"autoup": "all"
},
{
"id": "limit-login-attempts-reloaded",
"version": "2.26.18",
"activated": true,
"autoup": "all"
}
],
"stage": "1234567890abcdefghijstage",
"tables": [
"wp_commentmeta",
"wp_comments",
"wp_links",
"wp_options",
"wp_postmeta",
"wp_posts",
"wp_term_relationships",
"wp_term_taxonomy",
"wp_termmeta",
"wp_terms",
"wp_usermeta",
"wp_users"
],
"themes": [
{
"id": "twentytwentythree",
"version": "1.6",
"active": false,
"autoup": "all"
},
{
"id": "twentytwentyfive",
"version": "1.1",
"active": false,
"autoup": "all"
}
],
"time_created": 1611356510,
"time_updated": 1647057773,
"title": "My blog stage",
"url": "http://website.com/staging",
"url_domain": "website.com",
"user": "useraccountname",
"version": "6.7.2",
"version_autouped": "6.7.2",
"version_autouped_attempts": 1,
"version_available": "6.7.3",
"version_updates_available": 3
}
}