snipt

Ctrl+h for KB shortcuts

MySQL

Delete all post revisions

DELETE FROM wp_posts WHERE post_type = "revision";
-- where wp_posts is your WordPress table for posts
https://snipt.net/embed/1020d37ea219772e110648fa22f95208/
/raw/1020d37ea219772e110648fa22f95208/
1020d37ea219772e110648fa22f95208
mysql
MySQL
2
2019-07-23T19:06:37
True
False
False
/api/public/snipt/32517/
delete-all-post-revisions
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">DELETE</span> <span class="k">FROM</span> <span class="n">wp_posts</span> <span class="k">WHERE</span> <span class="n">post_type</span> <span class="o">=</span> <span class="s2">&quot;revision&quot;</span><span class="p">;</span> </span><span id="L-2"><a name="L-2"></a><span class="c1">-- where wp_posts is your WordPress table for posts</span> </span></pre></div> </td></tr></table>
revision