Title: Delete WP logs from database
Last modified: August 17, 2022

---

# Delete WP logs from database

 *  Resolved [vimalsoneil](https://wordpress.org/support/users/vimalsoneil/)
 * (@vimalsoneil)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/delete-wp-logs-from-database/)
 * [https://prnt.sc/lygO00ywcXS6](https://prnt.sc/lygO00ywcXS6)
 * when trying to access wp-admin/edit.php?post_type=wp_log , getting error There
   has been a critical error on this website.
 * had words with WPE they asked its memory limit issue and they can’t increase 
   more than 512mb So , is there a way to delete old logs directly from database?

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * (@jonathanstegall)
 * [3 years, 9 months ago](https://wordpress.org/support/topic/delete-wp-logs-from-database/#post-15925512)
 * Well, I’m not a SQL expert, but sure. You would do something like this (I’d recommend
   you test it first):
 *     ```
       DELETE p, pm
         FROM wp_posts p
        INNER
         JOIN wp_postmeta pm
           ON pm.post_id = p.ID
        WHERE p.post_type= 'wp_log';
       ```
   
 * You should probably figure out how often the plugin should delete the logs on
   its own though, to avoid having too many logs for the memory to handle. There’s
   [some documentation about this](https://github.com/MinnPost/object-sync-for-salesforce/blob/master/docs/logging.md).

Viewing 1 replies (of 1 total)

The topic ‘Delete WP logs from database’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/object-sync-for-salesforce.svg)
 * [Object Sync for Salesforce](https://wordpress.org/plugins/object-sync-for-salesforce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/object-sync-for-salesforce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/object-sync-for-salesforce/)
 * [Active Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/object-sync-for-salesforce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/object-sync-for-salesforce/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Jonathan Stegall](https://wordpress.org/support/users/jonathanstegall/)
 * Last activity: [3 years, 9 months ago](https://wordpress.org/support/topic/delete-wp-logs-from-database/#post-15925512)
 * Status: resolved