Content Marketing

WordPress and MySQL: What’s Your Word Count?

There’s been some talk on blogs about the average word count of a WordPress post. Some light has been shed that search engines will only weigh the impact of the first x number of characters, where x is currently unknown. As a result, anything after that is simply a waste of words.

wordle

I’m rather garrulous with my blog posts so I’m going to do some additional analysis and see if the popularity of the post from search results has any correlation to the word count. I won’t get too scientific, but I do want to take a deeper look.

How can I query WordPress for Word Count?

MySQL doesn’t have a built-in word count function for MySQL, but as with every other unanswered question, some smart guy on the blogosphere already answered how to use MySQL to get a Word Count.

Here’s the author’s word count query modified for a WordPress database:

SELECT `ID`, `post_date`, `post_type`,
SUM( LENGTH(`post_content`) - LENGTH(REPLACE(`post_content`, ' ', ''))+1) AS 'Wordcount'
FROM `wp_posts`
GROUP BY `ID`
HAVING `post_type` = 'post' AND `post_status` = 'publish'
ORDER BY `post_date` DESC
LIMIT 0, 100

I currently don’t subscribe to the ‘perfect post size’ since what really provides weight with a search engine isn’t simply the word count, but the number of links to that content. If you have a 2,000-word post that attracts a lot of link attention, then the right size of your post was 2,000 words.

Appreciate this content?

Sign up for our weekly newsletter, which delivers our latest posts every Monday morning.

We don’t spam! Read our privacy policy for more info.

Douglas Karr

Douglas Karr is a fractional Chief Marketing Officer specializing in SaaS and AI companies, where he helps scale marketing operations, drive demand generation, and implement AI-powered strategies. He is the founder and publisher of Martech Zone, a leading publication in marketing technology, and a trusted advisor to startups and enterprises alike. With a track record spanning more than $5 billion in MarTech acquisitions and investments, Douglas has led go-to-market strategy, brand positioning, and digital transformation initiatives for companies ranging from early-stage startups to global tech leaders like Dell, GoDaddy, Salesforce, Oracle, and Adobe. A published author of Corporate Blogging for Dummies and contributor to The Better Business Book, Douglas is also a recognized speaker, curriculum developer, and Forbes contributor. A U.S. Navy veteran, he combines strategic leadership with hands-on execution to help organizations achieve measurable growth.

Related Articles

Back to top button
Close

Adblock Detected

We rely on ads and sponsorships to keep Martech Zone free. Please consider disabling your ad blocker—or support us with an affordable, ad-free annual membership ($10 US):

Sign Up For An Annual Membership