Title: SQL Error when cloning
Last modified: May 30, 2019

---

# SQL Error when cloning

 *  Resolved [m4nson](https://wordpress.org/support/users/m4nson/)
 * (@m4nson)
 * [7 years ago](https://wordpress.org/support/topic/sql-error-when-cloning/)
 * Hello,
    We are having issue with this plugin – during the cloning process, we
   get this message: “Uh-oh – there was an sql error: Cannot delete or update a 
   parent row: a foreign key constraint fails.”
 * In logs we have this error:
    WordPress database error Cannot delete or update
   a parent row: a foreign key constraint fails for query DROP TABLE IF EXISTS `
   xxxx_woocommerce_downloadable_product_permissions` made by require_once(‘wp-admin/
   admin.php’), do_action(‘admin_init’), WP_Hook->do_action, WP_Hook->apply_filters,
   ns_cloner->admin_init, ns_cloner->process_init, ns_cloner->process, ns_cloner-
   >clone_tables
 * Thanks for your help!

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

 *  Plugin Author [Never Settle](https://wordpress.org/support/users/neversettle/)
 * (@neversettle)
 * [7 years ago](https://wordpress.org/support/topic/sql-error-when-cloning/#post-11590065)
 * Hi there!
 * Sorry about the issue. Usually, when that error comes up, it’s related to another
   plugin that creates its own foreign key constraint in a way that is problematic
   for cloning. You can usually tell what plugin it might be related to by looking
   at the end of the log and finding the table name that the Cloner was in the process
   of trying to clone. Generally, that plugin is the culprit.
 *  Plugin Author [Never Settle](https://wordpress.org/support/users/neversettle/)
 * (@neversettle)
 * [7 years ago](https://wordpress.org/support/topic/sql-error-when-cloning/#post-11592965)
 * Quick follow up here: just wanted to also let you know that we’re very close 
   to releasing a big 4.0 version update for the NS Cloner, and it has more robust
   database handling that is very likely to fix that issue for you.
 *  Thread Starter [m4nson](https://wordpress.org/support/users/m4nson/)
 * (@m4nson)
 * [7 years ago](https://wordpress.org/support/topic/sql-error-when-cloning/#post-11592972)
 * Ok, looking forward to that 🙂
    Thank you for your time!

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

The topic ‘SQL Error when cloning’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [m4nson](https://wordpress.org/support/users/m4nson/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/sql-error-when-cloning/#post-11592972)
 * Status: resolved