{"id":15,"date":"2026-11-09T20:29:40","date_gmt":"2026-11-09T20:29:40","guid":{"rendered":"https:\/\/nazmulrobin.com\/products\/database-cleaner\/docs\/cleanup\/"},"modified":"2026-11-09T20:29:40","modified_gmt":"2026-11-09T20:29:40","slug":"cleanup","status":"publish","type":"nazmulrobin_doc","link":"https:\/\/nazmulrobin.com\/products\/database-cleaner\/docs\/cleanup\/","title":{"rendered":"Database cleanup"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Cleanup lists every kind of data the database no longer needs, each with a live count:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Post revisions, auto-drafts and trashed posts<\/li>\n\n\n<li>Spam, trashed and pending comments, pingbacks and trackbacks<\/li>\n\n\n<li>Orphaned post, comment, term and user meta, and duplicate meta<\/li>\n\n\n<li>Orphaned term relationships and oEmbed caches<\/li>\n\n\n<li>Expired transients<\/li>\n\n\n<li>Content left by post types that no longer exist<\/li>\n\n\n<li>Finished, failed and canceled Action Scheduler actions and their logs<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Preview before you delete<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Every type shows exactly which rows a cleanup would remove. Anything with a date can keep the last N days.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Scheduled cleanups<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Give each cleanup type its own schedule: hourly, twice daily, daily, weekly or monthly, each with its own keep-the-last-N-days rule. Schedules are off until you turn one on. The riskier cleanups (duplicate meta, unregistered post types) can only be run by hand.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Can I undo a cleanup?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Cleanups of posts, comments, meta and tables are permanent, which is why each one shows a preview and asks first. Take a full database backup before a large cleanup.<\/p>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Cleanup lists every kind of data the database no longer needs, each with a live count: Preview before you delete Every type shows exactly which rows a cleanup would remove. Anything with a date can keep the last N days. Scheduled cleanups Give each cleanup type its own schedule: hourly, twice daily, daily, weekly or [&hellip;]<\/p>\n","protected":false},"parent":12,"menu_order":3,"template":"","class_list":["post-15","nazmulrobin_doc","type-nazmulrobin_doc","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/nazmulrobin_doc\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/nazmulrobin_doc"}],"about":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/types\/nazmulrobin_doc"}],"up":[{"embeddable":true,"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/nazmulrobin_doc\/12"}],"wp:attachment":[{"href":"https:\/\/nazmulrobin.com\/products\/wp-json\/wp\/v2\/media?parent=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}