Title: Delete Data From Database Upon Plugin Deletion
Last modified: August 13, 2022

---

# Delete Data From Database Upon Plugin Deletion

 *  Resolved [Ken Sim](https://wordpress.org/support/users/kwsim539/)
 * (@kwsim539)
 * [3 years, 10 months ago](https://wordpress.org/support/topic/delete-data-from-database-upon-plugin-deletion/)
 * While working out the plugin update issue I realized that when I delete the plugin
   the yaysmtp_email_logs table and the two options, (yaysmtp_debug and yaysmtp_settings)
   remain in the database.
 * These need to be deleted when the plugin is deleted or provided a checkbox option
   in the plugin settings to allow the deletion of this table and option data.
 * Leaving orphaned tables and data in a client’s database is not good practice.

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

 *  Plugin Support [Bruce](https://wordpress.org/support/users/ninjateamwp/)
 * (@ninjateamwp)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/delete-data-from-database-upon-plugin-deletion/#post-15914672)
 * Hi [@kwsim539](https://wordpress.org/support/users/kwsim539/) ,
 * Thanks for coming today!
 * This seems like a function of WordPress platform itself.
    But then, let me get
   more information about it and feed you back as soon as possible.
 * By the way, may I know why you are deleting YaySMTP from your site, please? Have
   you faced any issues with it?
 * Kind regards,
    -Bruce-
 *  Thread Starter [Ken Sim](https://wordpress.org/support/users/kwsim539/)
 * (@kwsim539)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/delete-data-from-database-upon-plugin-deletion/#post-15914711)
 * A function of WordPress Platform? Hmm. I don’t seem to have any issues updating
   my other plugins using this platform.
 * I removed the plugin because at the time I couldn’t get this plugin to do a successful
   email test and I needed to have a working SMTP mailer ASAP because the form on
   this site is used very often, and I could not afford to wait to hear back from
   you. However, after doing overlay installs on all my other sites, I figured out
   why this test was not working.
 * So, at this point, the issue still stands that your update failed on all of my
   sites and the only fix was to either revert all the sites back from backups, 
   delete and install the previous version I have, or attempt to do an overlay.
 *  [Rose](https://wordpress.org/support/users/rosewp/)
 * (@rosewp)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/delete-data-from-database-upon-plugin-deletion/#post-15915898)
 * Hi [@kwsim539](https://wordpress.org/support/users/kwsim539/),
 * Thanks for your patience.
 * Our developer checked but everything is working well.
    I think the problem is
   on your side (maybe after deleting your plugin and database and then after updating
   again, you didn’t fully update the settings as they were original).
 * Please double-check and let us know if it works.
 * Cheers,
    Rose

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

The topic ‘Delete Data From Database Upon Plugin Deletion’ is closed to new replies.

 * ![](https://ps.w.org/yaysmtp/assets/icon-256x256.png?rev=3056583)
 * [YaySMTP and Email Logs: Amazon SES, SendGrid, Outlook, Mailgun, Brevo, Google and Any SMTP Service](https://wordpress.org/plugins/yaysmtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/yaysmtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/yaysmtp/)
 * [Active Topics](https://wordpress.org/support/plugin/yaysmtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/yaysmtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/yaysmtp/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Rose](https://wordpress.org/support/users/rosewp/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/delete-data-from-database-upon-plugin-deletion/#post-15915898)
 * Status: resolved