Created
October 2, 2009 02:26
-
-
Save xdissent/199412 to your computer and use it in GitHub Desktop.
SQL to get the WordPress word count for all posts.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT SUM(LENGTH(post_content) - LENGTH(REPLACE(post_content, ' ', '')) + 1) as 'Word Count' FROM `wp_posts` WHERE post_status='publish' AND post_type='post'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment