Created
June 1, 2016 18:04
-
-
Save basilesimon/2526cd881068a7559c8082fd06b3fafe to your computer and use it in GitHub Desktop.
SQL - Wordpress Word Count across *all* pages
This file contains hidden or 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='page'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment