Title: Uninstall not working correctly
Last modified: March 17, 2020

---

# Uninstall not working correctly

 *  Resolved [Ilari Arovuo](https://wordpress.org/support/users/iarovuo/)
 * (@iarovuo)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/uninstall-not-working-correctly/)
 * the uninstall script uses hard-coded table names in the script, and causes failure
   with uninstall, when “delete data” has been enabled in the settings.
 * Most sites have table name prefix in use, so you can’t use hard-coded table names
   in scripts.
 * You need to implement something like this in the code, when dealing with database
   tables directly; (like the non-working uninstall script)
 *     ```
       global $wpdb;
       $tbl_prefix = $wpdb->get_blog_prefix();
       $wpdb->query("DELETE FROM ".$tbl_prefix."posts WHERE post_type = 'at_biz_dir'");
       ```
   

Viewing 1 replies (of 1 total)

 *  [aazztech](https://wordpress.org/support/users/aazztech/)
 * (@aazztech)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/uninstall-not-working-correctly/#post-12555092)
 * Hi,
    Thank you for letting us know about it, it will be fixed in next release.

Viewing 1 replies (of 1 total)

The topic ‘Uninstall not working correctly’ is closed to new replies.

 * ![](https://ps.w.org/directorist/assets/icon-256x256.gif?rev=3185058)
 * [Directorist: AI-Powered Business Directory, Listings & Classified Ads](https://wordpress.org/plugins/directorist/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/directorist/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/directorist/)
 * [Active Topics](https://wordpress.org/support/plugin/directorist/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/directorist/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/directorist/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [aazztech](https://wordpress.org/support/users/aazztech/)
 * Last activity: [6 years, 1 month ago](https://wordpress.org/support/topic/uninstall-not-working-correctly/#post-12555092)
 * Status: resolved