How To Set A Minimum Word Count For WordPress Posts
How to Set Minimum Word Count For WordPress Posts

Are you in any way seeking a permanent solution to simply limit the number of words in all of your WordPress posts?

There are always ways to put in more work and guarantee that you give top-notch material to your readers, whether you manage a multi-author site or write all of your own pieces. Setting a minimum word count might help you set a benchmark and enhance your chances of ranking better. WordPress plugins such as PublishPress Checklists may be used to define a minimum word count, which helps to manage the quality of your WordPress posts.

So, don’t worry as Digital Suncity is there to help you out.

Discuss the relevance of limiting your WordPress articles to a minimal number of words

To offer high-quality articles and sustain ranks, some content criteria must be established. Whether you’re writing material on your own or with a team, you can prevent writers from posting thin content, hence improving content quality. According to studies, lengthier content ranks higher in search results than shorter content and drives more people to your site. Longer posts also provide more thorough information to readers and assist to rank better in search engines.

You can watch the video tutorial below for this article:

Rank Math, For the same reason, SEO’s content analysis provides word count suggestions and analyses the text length of your piece. The minimal word count for articles or pages is 600 words, while the minimum word count for commodities is 200 words. 

Word Count Recommendations for Rank Math Content Analysis While Rank Math provides word count suggestions, it does not prevent your content from being published if it is less than the recommended word count. As a result, the remainder of this article will lead you through the process of establishing a minimum word count.

How to Check WordPress Rank’s Word Count 

The word count of your post is included in Math’s Meta Box, as illustrated in the picture above. Furthermore, both the Classic and Gutenberg editors make it exceedingly simple to verify the word count.

Let’s check out the two ways we can do this! 

  • You can make use of the Gutenberg Editor if you wish to check the number of words present- In the Gutenberg editor, you just simply have to tap the I with a circle’ symbol to check the word count.
  • You can also make use of the Classic Editor if you wish to check the number of words- In the classic editor, the total number of words is shown just right at the bottom of the editor. 
 Set Minimum Word Count For WordPress Posts

Now, let’s move forward with the main solution to your query.

  • Firstly, open your WordPress Admin dashboard.
  • Hover on to Appearances.
  • After that, just simply go and tap on Theme Editor.
  • Go ahead and just tap on Theme Functions from the right hand side of the screen.
  • Scroll downwards until you finally reach the end of the screen.
  • Now, you have to add a small piece of code.
Set Minimum Word Count For WordPress Posts

NOTE: Before making any code-related changes, it is suggested to have a backup of your website JUST IN CASE anything goes wrong, then you can at least restore it afterwards.


function minWord($content)


    global $post;

    $content = $post->post_content;

    if (str_word_count($content) < 100 ) //set this to the minimum number of words

    wp_die( __(‘Error: your post is below the minimum word count. It needs to be longer than 100 words.’) );


add_action(‘publish_post’, ‘minWord’);
Set Minimum Word Count For WordPress Posts

Note: You may go ahead and modify the minimum number of words from 100 to whichever minimum word count you want to have as per your requirements, and you can also edit the error to make it more useful. Make careful to adjust the number in both places in the code.

  • Further, click on the Update File.

Now, you can go ahead and check in a new post whether the minimum requirement of words is set as per your need. 

As long as you followed our steps correctly, you must have achieved your desired minimum word count for your WordPress posts.

In case you have more queries, and require more help, feel absolutely free to check out our website or contact Digital Suncity.

Also Read: How To Add SVG Files In WordPress


Submit a Comment

Your email address will not be published. Required fields are marked *

Need Professional Help?

We can help you with website fixes and ongoing maintenance.