Create Clone Programmically?
-
Is it possible to start the cloning process programmatically using PHP?
The CLI is working for us but I’d prefer not to use shell_exec in production code.
I tried the following code but I’m getting errors that Classes do not exist, it would appear MUCD_Admin is only loaded when an admin user is present.
// Form Data $site_domain = 'mygreatwebsite'; $data = array( 'source' => 0, 'domain' => $site_domain, 'title' => $site_domain, 'email' => "[email protected]", 'copy_files' => 'yes', 'keep_users' => 'no', 'log' => 'yes', 'log-path' => '/app/public/wp-content/uploads/multisite-clone-duplicator-logs/', 'advanced' => 'hide-advanced-options' ); $mucd_admin = new MUCD_Admin; $data = $mucd_admin->check_form($data); if (isset($data['error']) ) { $form_message['error'] = $data['error']->get_error_message(); } else { $form_message = MUCD_Duplicate::duplicate_site($data); }
- The topic ‘Create Clone Programmically?’ is closed to new replies.