Title: Database Error wcpt_cleanup_sessions
Last modified: October 27, 2021

---

# Database Error wcpt_cleanup_sessions

 *  Resolved [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-wcpt_cleanup_sessions/)
 * 2-3 times per day I get this in my PHP error log on a website that I am developing:
 * `[27-Oct-2021 01:29:13 UTC] WordPress database error Table '..._wcpt_sessions'
   doesn't exist for query DELETE FROM ..._wcpt_sessions WHERE session_expiry < 
   1635298153 made by do_action_ref_array('wcpt_cleanup_sessions'), WP_Hook->do_action,
   WP_Hook->apply_filters, wcpt_cleanup_session_data, WCPT_Session_Handler->cleanup_sessions`
 * It appears it is a function from this plugin that runs on a schedule produces
   this error. This could be avoided by simply adding a check if the Table exists
   before running the delete command.
    -  This topic was modified 4 years, 7 months ago by [Daniel Chase](https://wordpress.org/support/users/riseofweb/).
      Reason: misspelling

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

 *  Plugin Author [WC Product Table](https://wordpress.org/support/users/wcproducttable/)
 * (@wcproducttable)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-wcpt_cleanup_sessions/#post-15012895)
 * Hi Daniel,
 * Thank you for your feedback. However, this is a very unusual error. Allow me 
   to explain:
 * – If you are running the Lite version of the plugin then the database cleanup
   command is not supposed to be hooked in at all. There is a very clear check for
   this in the Lite version. It’s been tested and other Lite users have not reported
   such an issue.
    – On the other hand if you are using the plugin’s PRO version
   then the database table should definitely be there as the plugin builds it when
   it is first run on the site. So again, this error should not be coming up.
 * Hence such an error should not be coming up in either case. I appreciate your
   input as well, and I have added in the additional check inside the callback function
   to only run if the database table exists. Though technically it should not be
   required.
 * I would like to find out why this error is coming up at your end and help resolve
   it. For this, I will need you to get in touch with me through the [plugin support form](https://wcproducttable.com/support).
 * Regards,
    Kartik
 *  Thread Starter [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * (@riseofweb)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-wcpt_cleanup_sessions/#post-15013041)
 * Kartik, thank you for your prompt reply.

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

The topic ‘Database Error wcpt_cleanup_sessions’ is closed to new replies.

 * ![](https://ps.w.org/wc-product-table-lite/assets/icon-256x256.png?rev=3370649)
 * [Product Table & List Builder for WooCommerce](https://wordpress.org/plugins/wc-product-table-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wc-product-table-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wc-product-table-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/wc-product-table-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wc-product-table-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wc-product-table-lite/reviews/)

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)

 * 2 replies
 * 2 participants
 * Last reply from: [Daniel Chase](https://wordpress.org/support/users/riseofweb/)
 * Last activity: [4 years, 7 months ago](https://wordpress.org/support/topic/database-error-wcpt_cleanup_sessions/#post-15013041)
 * Status: resolved