{"id":2639,"date":"2021-06-08T14:48:49","date_gmt":"2021-06-08T14:48:49","guid":{"rendered":"https:\/\/rengga.dev\/blog\/?p=2639"},"modified":"2023-02-28T04:19:31","modified_gmt":"2023-02-28T04:19:31","slug":"how-to-get-word-count-stats-in-wordpress-3-ways","status":"publish","type":"post","link":"https:\/\/rengga.dev\/blog\/how-to-get-word-count-stats-in-wordpress-3-ways\/","title":{"rendered":"How to Get Word Count Stats in WordPress (3 Ways)"},"content":{"rendered":"<p>Do you want to get word count stats in WordPress?<\/p>\n<p>When writing a post, you may have a specific word count that you\u2019re aiming to reach. Plus, monitoring your word count stats can give you insights like what post length gets the most traffic and engagement.<\/p>\n<p>In this article, we will show you how you can show detailed word count stats in WordPress.<\/p>\n<h4><strong>Why Get Word Count Stats for Your WordPress Website?<\/strong><\/h4>\n<p>There are many reasons why you may want to get the word count for your\u00a0WordPress website.<\/p>\n<p>If you\u2019re a freelance writer, then you may charge per word or your clients might have strict word count goals that you need to meet.<\/p>\n<p>If you\u2019ve\u00a0added multiple authors to your WordPress blog, then monitoring their word count stats can help you identify the authors who are contributing the most to your website.<\/p>\n<p>This insight can help you manage your multi-author WordPress blog more efficiently. For example, you might reward the author who has the highest word count, or schedule meetings with any writers who are underperforming.<\/p>\n<p>Even if you\u2019re the only person working on a website, word count stats can still be interesting. By looking at how your word count changes over time, you may be able to spot patterns and ways to be more productive.<\/p>\n<p>With all that in mind, let\u2019s look at a few different ways to get word count stats in WordPress. If you prefer to jump straight to a particular method, then you can use the links below.<\/p>\n<ul>\n<li>Method 1. How to check the word count on an article in WordPress<\/li>\n<li>Method 2. Get more detailed word count stats with a plugin<\/li>\n<li>Method 3. How to add word count stats in WordPress using code<\/li>\n<\/ul>\n<h4 id=\"check-word-count-article-wordpress\"><strong>Method 1. How to Check the Word Count on an Article in WordPress<\/strong><\/h4>\n<p>The\u00a0WordPress block editor\u00a0makes it easy to see the word count for any page or post.<\/p>\n<p>Simply click on the \u2018i\u2019 icon at the top of the screen, and WordPress will show some basic stats for the page or post, including the word count.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132445 lazyloaded\" title=\"Getting the word count in the WordPress block editor\" src=\"https:\/\/cdn3.wpbeginner.com\/wp-content\/uploads\/2013\/07\/block-word-count.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn3.wpbeginner.com\/wp-content\/uploads\/2013\/07\/block-word-count.png 680w, https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/block-word-count-300x136.png 300w\" alt=\"Getting the word count in the WordPress block editor\" width=\"680\" height=\"309\" data-ll-status=\"loaded\" \/><\/figure>\n<p>Even better, this word count will update automatically as you write.<\/p>\n<p>If you have a word limit, then this is a quick and easy way to make sure you don\u2019t go over that limit.<\/p>\n<h4 id=\"check-word-count-wordpress-website-plugin\"><strong>Method 2. Get Detailed Word Count Stats in WordPress With a Plugin<\/strong><\/h4>\n<p>Sometimes you may want to see word count stats for a particular author, type of post, or even your entire website.<\/p>\n<p>The easiest way to get these detailed stats is by using the\u00a0<a title=\"The WP Count WordPress plugin\" href=\"https:\/\/wordpress.org\/plugins\/wp-word-count\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">WP Word Count<\/a>\u00a0plugin. This plugin shows how many words you\u2019ve written based on month, author, and post type.<\/p>\n<p>If you\u2019re using\u00a0custom post types, then WP Word Count can also show statistics for your custom posts.<\/p>\n<p>First, you\u2019ll need to install and activate the plugin. If you need help, then please see our guide on\u00a0how to install a WordPress plugin.<\/p>\n<p>Once you\u2019ve done that, go to\u00a0<strong>Word Count \u00bb Statistics<\/strong>. Before you can get your stats, you\u2019ll need to click on the \u2018calculate\u2019 link.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132446 lazyloaded\" title=\"Calculating the word count for your WordPress website\" src=\"https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/word-count-calculate.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/word-count-calculate.png 680w, https:\/\/cdn2.wpbeginner.com\/wp-content\/uploads\/2013\/07\/word-count-calculate-300x162.png 300w\" alt=\"Calculating the word count for your WordPress website\" width=\"680\" height=\"368\" data-ll-status=\"loaded\" \/><\/figure>\n<p>WP Word Count will ask whether you want to count the words for all your content, or to only count content that was created within a certain date range.<\/p>\n<p>To calculate the total word count for your entire site, click on the \u2018Count all content on this site at one time\u2019 option. Then, go ahead and click on Calculate Word Counts.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132447 lazyloaded\" title=\"Getting word count stats in WordPress\" src=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/calculate-word-count.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/calculate-word-count.png 680w, https:\/\/cdn2.wpbeginner.com\/wp-content\/uploads\/2013\/07\/calculate-word-count-300x147.png 300w\" alt=\"Getting word count stats in WordPress\" width=\"680\" height=\"333\" data-ll-status=\"loaded\" \/><\/figure>\n<p>After a few moments, you should see a \u2018Word counts calculated successfully\u2019 message.<\/p>\n<p>WP Word Count will now continue to calculate your stats automatically as you add more posts and pages to your site. This means you won\u2019t need to click on the \u2018calculate\u2019 link every time you want to see the latest word count stats.<\/p>\n<p>Now, anytime you want to see your stats, you can go to\u00a0<strong>Word Count \u00bb Statistics<\/strong>. To see the total word count for all your content, click on the All Content tab.<\/p>\n<p>On this screen, you\u2019ll see the total word count for the different post types, divided into published and unpublished content.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132448 lazyloaded\" title=\"Word count statistics in the WordPress dashboard\" src=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/word-count-totals.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/word-count-totals.png 680w, https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/word-count-totals-300x127.png 300w\" alt=\"Word count statistics in the WordPress dashboard\" width=\"680\" height=\"288\" data-ll-status=\"loaded\" \/><\/figure>\n<p>\u2018Total Words\u2019 is your total word count across all content types.<\/p>\n<p>This number combines both your published and unpublished content, so it isn\u2019t necessarily the amount of words that visitors will see live on your website.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132449 lazyloaded\" title=\"The WP Word Count plugin\" src=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/total-words-count.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/total-words-count.png 680w, https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/total-words-count-300x95.png 300w\" alt=\"The WP Word Count plugin\" width=\"680\" height=\"215\" data-ll-status=\"loaded\" \/><\/figure>\n<p>This screen also shows separate word counts for published and unpublished content.<\/p>\n<p>If you want to see the word count for specific months, then simply click on the \u2018Monthly Statistics\u2019 tab. This can help you spot trends including your most productive months, and times when you wrote fewer words compared to other months.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132450 lazyloaded\" title=\"Monthly word count stats in WordPress\" src=\"https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/count-monthly-statistics-.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/count-monthly-statistics-.png 680w, https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/count-monthly-statistics--300x146.png 300w\" alt=\"Monthly word count stats in WordPress\" width=\"680\" height=\"331\" data-ll-status=\"loaded\" \/><\/figure>\n<p>If multiple people write for your\u00a0WordPress blog, then you may want to take a look at the \u2018Author Statistics\u2019 tab.<\/p>\n<p>This lets you explore your site\u2019s word count stats by author.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132451 lazyloaded\" title=\"Author word count statistics in WordPress\" src=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/author-statistics-count.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn.wpbeginner.com\/wp-content\/uploads\/2013\/07\/author-statistics-count.png 680w, https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/author-statistics-count-300x129.png 300w\" alt=\"Author word count statistics in WordPress\" width=\"680\" height=\"292\" data-ll-status=\"loaded\" \/><\/figure>\n<p>You might also want to track the traffic that each of your authors brings to your website. To do that, you can see our guide on\u00a0how to set up author tracking in WordPress.<\/p>\n<p>By monitoring these important metrics on your WordPress site, you can identify what\u2019s working on your website and what isn\u2019t.<\/p>\n<p>You can then use this insight to fine-tune your content calendar to get even more visitors to your website, and\u00a0make money online blogging with WordPress.<\/p>\n<h4 id=\"add-word-count-stats-wordpress-code\"><strong>Method 3. How to Add Word Count Stats in WordPress Using Code<\/strong><\/h4>\n<p>Another option for tracking word counts is a code solution. This code snippet will show the word count next to each post on the\u00a0<strong>Posts \u00bb All Posts<\/strong>\u00a0screen.<\/p>\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-132452 lazyloaded\" title=\"Adding a word count to the WordPress dashboard\" src=\"https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/all-posts-count.png\" sizes=\"auto, (max-width: 680px) 100vw, 680px\" srcset=\"https:\/\/cdn4.wpbeginner.com\/wp-content\/uploads\/2013\/07\/all-posts-count.png 680w, https:\/\/cdn3.wpbeginner.com\/wp-content\/uploads\/2013\/07\/all-posts-count-300x104.png 300w\" alt=\"Adding a word count to the WordPress dashboard\" width=\"680\" height=\"236\" data-ll-status=\"loaded\" \/><\/figure>\n<p>This is an easy way to spot your site\u2019s longest posts, or check for any posts that don\u2019t meet a required word count.<\/p>\n<p>To show a word count on the All Posts screen, you\u2019ll need to add some code to your site. We recommend doing this by creating a\u00a0site-specific plugin\u00a0or using a\u00a0code snippets plugin.<\/p>\n<p>No matter what option you choose, you\u2019ll need to add the following code:<\/p>\n<div class=\"wp-block-syntaxhighlighter-code \">\n<div>\n<div id=\"highlighter_391265\" class=\"syntaxhighlighter php\">\n<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td class=\"gutter\">\n<div class=\"line number1 index0 alt2\">1<\/div>\n<div class=\"line number2 index1 alt1\">2<\/div>\n<div class=\"line number3 index2 alt2\">3<\/div>\n<div class=\"line number4 index3 alt1\">4<\/div>\n<div class=\"line number5 index4 alt2\">5<\/div>\n<div class=\"line number6 index5 alt1\">6<\/div>\n<div class=\"line number7 index6 alt2\">7<\/div>\n<div class=\"line number8 index7 alt1\">8<\/div>\n<div class=\"line number9 index8 alt2\">9<\/div>\n<div class=\"line number10 index9 alt1\">10<\/div>\n<div class=\"line number11 index10 alt2\">11<\/div>\n<div class=\"line number12 index11 alt1\">12<\/div>\n<div class=\"line number13 index12 alt2\">13<\/div>\n<div class=\"line number14 index13 alt1\">14<\/div>\n<div class=\"line number15 index14 alt2\">15<\/div>\n<div class=\"line number16 index15 alt1\">16<\/div>\n<div class=\"line number17 index16 alt2\">17<\/div>\n<div class=\"line number18 index17 alt1\">18<\/div>\n<div class=\"line number19 index18 alt2\">19<\/div>\n<div class=\"line number20 index19 alt1\">20<\/div>\n<div class=\"line number21 index20 alt2\">21<\/div>\n<div class=\"line number22 index21 alt1\">22<\/div>\n<div class=\"line number23 index22 alt2\">23<\/div>\n<div class=\"line number24 index23 alt1\">24<\/div>\n<\/td>\n<td class=\"code\">\n<div class=\"container\">\n<div class=\"line number1 index0 alt2\"><code class=\"php plain\">add_filter(<\/code><code class=\"php string\">'manage_posts_columns'<\/code><code class=\"php plain\">, <\/code><code class=\"php string\">'wpbeginner_add_column'<\/code><code class=\"php plain\">);<\/code><\/div>\n<div class=\"line number2 index1 alt1\"><code class=\"php keyword\">function<\/code> <code class=\"php plain\">wpbeginner_add_column(<\/code><code class=\"php variable\">$wpbeginner_wordcount_column<\/code><code class=\"php plain\">) {<\/code><\/div>\n<div class=\"line number3 index2 alt2\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php variable\">$wpbeginner_wordcount_column<\/code><code class=\"php plain\">[<\/code><code class=\"php string\">'wpbeginner_wordcount'<\/code><code class=\"php plain\">] = <\/code><code class=\"php string\">'Word Count'<\/code><code class=\"php plain\">;<\/code><\/div>\n<div class=\"line number4 index3 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php keyword\">return<\/code> <code class=\"php variable\">$wpbeginner_wordcount_column<\/code><code class=\"php plain\">;<\/code><\/div>\n<div class=\"line number5 index4 alt2\"><code class=\"php plain\">}<\/code><\/div>\n<div class=\"line number6 index5 alt1\"><code class=\"php spaces\">\u00a0<\/code><\/div>\n<div class=\"line number7 index6 alt2\"><code class=\"php comments\">\/\/Link the word count to our new column\/\/<\/code><\/div>\n<div class=\"line number8 index7 alt1\"><code class=\"php plain\">add_action(<\/code><code class=\"php string\">'manage_posts_custom_column'<\/code><code class=\"php plain\">,\u00a0 <\/code><code class=\"php string\">'wpbeginner_display_wordcount'<\/code><code class=\"php plain\">); <\/code><\/div>\n<div class=\"line number9 index8 alt2\"><code class=\"php keyword\">function<\/code> <code class=\"php plain\">wpbeginner_display_wordcount(<\/code><code class=\"php variable\">$name<\/code><code class=\"php plain\">) <\/code><\/div>\n<div class=\"line number10 index9 alt1\"><code class=\"php plain\">{<\/code><\/div>\n<div class=\"line number11 index10 alt2\"><code class=\"php spaces\">\u00a0\u00a0\u00a0<\/code><code class=\"php keyword\">global<\/code> <code class=\"php variable\">$post<\/code><code class=\"php plain\">;<\/code><\/div>\n<div class=\"line number12 index11 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0<\/code><code class=\"php keyword\">switch<\/code> <code class=\"php plain\">(<\/code><code class=\"php variable\">$name<\/code><code class=\"php plain\">)<\/code><\/div>\n<div class=\"line number13 index12 alt2\"><code class=\"php plain\">{<\/code><\/div>\n<div class=\"line number14 index13 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php keyword\">case<\/code> <code class=\"php string\">'wpbeginner_wordcount'<\/code><code class=\"php plain\">:<\/code><\/div>\n<div class=\"line number15 index14 alt2\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php comments\">\/\/Get the post ID and pass it into the get_wordcount function\/\/<\/code><\/div>\n<div class=\"line number16 index15 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php variable\">$wpbeginner_wordcount<\/code> <code class=\"php plain\">= wpbeginner_get_wordcount(<\/code><code class=\"php variable\">$post<\/code><code class=\"php plain\">-&gt;ID);<\/code><\/div>\n<div class=\"line number17 index16 alt2\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php functions\">echo<\/code> <code class=\"php variable\">$wpbeginner_wordcount<\/code><code class=\"php plain\">;<\/code><\/div>\n<div class=\"line number18 index17 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php plain\">}<\/code><\/div>\n<div class=\"line number19 index18 alt2\"><code class=\"php plain\">}<\/code><\/div>\n<div class=\"line number20 index19 alt1\"><\/div>\n<div class=\"line number21 index20 alt2\"><code class=\"php keyword\">function<\/code> <code class=\"php plain\">wpbeginner_get_wordcount(<\/code><code class=\"php variable\">$post_id<\/code><code class=\"php plain\">) {<\/code><\/div>\n<div class=\"line number22 index21 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php comments\">\/\/Get the post, remove any unnecessary tags and then perform the word count\/\/ <\/code><\/div>\n<div class=\"line number23 index22 alt2\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php variable\">$wpbeginner_wordcount<\/code> <code class=\"php plain\">= <\/code><code class=\"php functions\">str_word_count<\/code><code class=\"php plain\">( <\/code><code class=\"php functions\">strip_tags<\/code><code class=\"php plain\">( strip_shortcodes(get_post_field( <\/code><code class=\"php string\">'post_content'<\/code><code class=\"php plain\">, <\/code><code class=\"php variable\">$post_id<\/code> <code class=\"php plain\">)) ) );<\/code><\/div>\n<div class=\"line number24 index23 alt1\"><code class=\"php spaces\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/code><code class=\"php keyword\">return<\/code> <code class=\"php variable\">$wpbeginner_wordcount<\/code><code class=\"php plain\">;<\/code><\/div>\n<\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<p>You can then save your changes.<\/p>\n<p>Now, if you visit the\u00a0<strong>Posts \u00bb All Posts<\/strong>\u00a0screen, you\u2019ll see the word count in a new column.<\/p>\n<p>We hope this guide helped you learn how to get word count stats in WordPress. You may also want to learn\u00a0how to set up Google Analytics goals for your WordPress site, or check out our list of the\u00a0best email marketing services for small businesses.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you want to get word count stats in WordPress? When writing <a class=\"read-more\" href=\"https:\/\/rengga.dev\/blog\/how-to-get-word-count-stats-in-wordpress-3-ways\/\" title=\"How to Get Word Count Stats in WordPress (3 Ways)\" itemprop=\"url\"><\/a><\/p>\n","protected":false},"author":1,"featured_media":3812,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[119,114,130],"newstopic":[],"class_list":{"0":"post-2639","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-wordpress","8":"tag-design-tips","9":"tag-web-design-trends","10":"tag-word-count-stats"},"_links":{"self":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/2639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/comments?post=2639"}],"version-history":[{"count":1,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/2639\/revisions"}],"predecessor-version":[{"id":2641,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/posts\/2639\/revisions\/2641"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media\/3812"}],"wp:attachment":[{"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/media?parent=2639"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/categories?post=2639"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/tags?post=2639"},{"taxonomy":"newstopic","embeddable":true,"href":"https:\/\/rengga.dev\/blog\/wp-json\/wp\/v2\/newstopic?post=2639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}