-
Wordpress wp_posts SQL Hack
July 17th, 2009
Speeding up Wordpress by deleting all revisions.
The Wordpress db keeps all revisions. If you have a large database (say 100,000 records) you can speed it up by deleting the revisions. The code for that is:
DELETE FROM wp_posts WHERE post_type = “revision”;Your actual wp_posts table will have a name like wp_xd7tjs_posts. This is to improve Wordpress security. If your wp_posts is named wp_xd7tjs_posts then the code is:
DELETE FROM wp_xd7tjs_posts WHERE post_type = “revision”;