Call: (480) 382-8464

Remove WordPress Revisions

 
DELETE a,b,c 
FROM wp_posts 
a LEFT JOIN wp_term_relationships 
b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta 
c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'

Site Wide Limiting of Revisions in wp-config.php:


define('WP_POST_REVISIONS', false); 
//or if you want 1 revision: 
define('WP_POST_REVISIONS', 1);

note that you cannot delete all inherits in the wp_post status because each attachment inherits it’s short codes from the published article. If I publish id 271, then have 3 attachments, they’ll be numbered 272, 273, 274

Leave a Reply

Your email address will not be published. Required fields are marked *

Main Offers/Services

Hosting and website related services offered by Digital Crunch:



Managed VPS Hosting

Server Updates, Module/Software Installs, Firewall, Security, Hosting Management, Wordpress - let us manage it for you

Hosted Email

Setup and Maintain Business Class, Secure Email Hosting including spam protection and 25GB of storage space

Linux Consulting

Server Updates, Module/Software Installs, Firewall, Security, Hosting, Wordpress and Apps, anything related to Linux

Email Marketing Services

We broadcast your content to your list, capture leads for you, follow up on schedules, make more sales for you

Website Maintenance

Content updates, menu changes, graphics changes, adding content, getting links, building traffic, building sales funnels

Hosting Tutorials

Tutorials we've written for other customers that like to get their hands dirty and learn about hosting