Title: Programmatic cloning sometimes does not complete
Last modified: January 21, 2024

---

# Programmatic cloning sometimes does not complete

 *  [Chris](https://wordpress.org/support/users/chips/)
 * (@chips)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/programmatic-cloning-sometimes-does-not-complete/)
 * I’ve been using NS Cloner successfully for some time now using the admin interface,
   but I now need to start the cloning process programmatically. I used the code
   example at [https://support.neversettle.it/article/22-how-to-call-ns-cloner-to-copy-sites-from-other-plugins](https://support.neversettle.it/article/22-how-to-call-ns-cloner-to-copy-sites-from-other-plugins)
   which sometimes works, but a lot of the time doesn’t complete. The three outcomes
   I have so far identified are either a successful clone, a new, empty site or 
   no site at all. If I open the admin interface then the cloning dialog pops up
   and sometimes that will complete the cloning process. Obviously this is no good.
   I need the cloning process to complete automatically.
 * Is there a way to trigger whatever processes run when the admin interface dialog
   pops up porogrammatically so that the process can complete without any human 
   intervention?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Never Settle](https://wordpress.org/support/users/neversettle/)
 * (@neversettle)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/programmatic-cloning-sometimes-does-not-complete/#post-17365320)
 * Hey [@chips](https://wordpress.org/support/users/chips/),
 * We are currently working on improving the custom code cloning experience for 
   the next release
 *  [nlittle](https://wordpress.org/support/users/nancylittle419/)
 * (@nancylittle419)
 * [2 years ago](https://wordpress.org/support/topic/programmatic-cloning-sometimes-does-not-complete/#post-17787518)
 * Hi [@neversettle](https://wordpress.org/support/users/neversettle/) ,
 * Any update on this issue? I’m running into the same problem.
   Thanks in advance!
 *  [yabwee](https://wordpress.org/support/users/yabwee/)
 * (@yabwee)
 * [1 year, 6 months ago](https://wordpress.org/support/topic/programmatic-cloning-sometimes-does-not-complete/#post-18137097)
 * +1 for this. As someone who plans to use NS Cloner to clone sites in a client-
   initiated, programmatic manner, this fix is crucial for an otherwise bullet-proof
   plugin which is NS Cloner!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Programmatic cloning sometimes does not complete’ is closed to new replies.

 * ![](https://ps.w.org/ns-cloner-site-copier/assets/icon-256x256.gif?rev=2323308)
 * [NS Cloner - Site Copier](https://wordpress.org/plugins/ns-cloner-site-copier/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ns-cloner-site-copier/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ns-cloner-site-copier/)
 * [Active Topics](https://wordpress.org/support/plugin/ns-cloner-site-copier/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ns-cloner-site-copier/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ns-cloner-site-copier/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [yabwee](https://wordpress.org/support/users/yabwee/)
 * Last activity: [1 year, 6 months ago](https://wordpress.org/support/topic/programmatic-cloning-sometimes-does-not-complete/#post-18137097)
 * Status: not resolved