Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

How to Set a Minimum Word Count for WordPress Posts

At WPBeginner, we’ve found that a minimum word count is important for producing high-quality content. By requiring a minimum word count for our posts, it encourages our writers to dive deeper into topics and provide more helpful information that benefits our audience.

If you have multiple authors on your site, then we recommend setting up a minimum word count to ensure that your writers meet content standards and fully answer the reader’s questions.

In this article, we’ll show you how to set a minimum word count for your WordPress posts.

Set Minimum Word Count for WordPress Posts

Why Set a Minimum Word Count for Your Blog Posts?

Whether you’re creating content yourself or running a multi-author website, you should set certain content standards to ensure top-quality articles.

One of the standards you can introduce is a minimum word count for each WordPress blog post. With WordPress, you can restrict authors from publishing blog posts with thin content and ensure high content quality.

Why would you want to enforce longer posts?

Some research suggests that longer content tends to rank significantly better in search results than short content, which could help you get more traffic to your blog.

In fact, posts with over 3,000 words get 138% more visitors than posts that have fewer than 500 words, according to blogging statistics.

That being said, let’s look at how you can set a minimum word count in a WordPress blog. You can use the quick links below to jump right to the method that you want to use.

Method 1: Set a Minimum Word Count Using a Plugin

A simple way to add a minimum word count to your WordPress website is by using a plugin like PublishPress Checklists.

PublishPress Checklists allow you to add a blog post checklist to the WordPress editor. You can set specific tasks that authors must complete before publishing content, including adding a minimum and maximum word count on posts and pages.

Note: For this tutorial, you can use the free version of PublishPress Checklists, since it has the features we need. There’s also a premium version available that offers more features like checklists for WooCommerce products.

First, you’ll need to install and activate the PublishPress Checklists plugin. You can follow our step-by-step tutorial on how to install a WordPress plugin for more details.

Upon activation, you’ll need to go to Checklists from your WordPress admin panel. Next, you can set minimum and maximum words for the ‘Number of words in content’ option.

Change PublishPress Checklists settings

After that, you can choose whether you want to make the ‘Number of words in content’ option to be disabled, required, or recommended task from the dropdown menu.

If you select Recommended, then authors can publish articles even if they don’t meet the minimum word count. However, the Required option makes it mandatory to complete the word count task, so go ahead and select the Required option.

Besides that, PublishPress Checklists also lets you add user roles to exclude from meeting the word count requirement. Simply click on the box under the ‘Who can ignore the task’ column and select a user role.

Choose user roles to exclude

When you’ve set the number of words writers should complete, simply scroll down and click the ‘Save Changes’ button.

Save your changes

Now you can go to Posts » Add New to create a new blog post and see the minimum word count requirement in action.

If the post doesn’t contain the minimum number of words, a warning icon will appear on the ‘Checklists’ button in the WordPress editor. The plugin will also show that the word count task wasn’t met in the ‘Checklist’ settings box on your right.

Minimum word count warning in editor

Once your content meets the minimum word count, the checklist task will show a green checkmark, and authors can publish the blog post.

Green checkmark when the checklist task is met

To learn more about PublishPress, you can check out our detailed PublishPress review.

Method 2: Manually Set a Minimum Word Count Limit

Another way to add a minimum word count on your WordPress website is by adding a code snippet to the functions.php files in a WordPress theme.

However, we don’t recommend editing your site’s theme files. That’s because even a small mistake can break your website and even prevent you from accessing the WordPress dashboard.

An easier way to add code to your site is by using WPCode. It lets you add custom code without worrying about breaking your site.

Plus, it comes with a library of pre-configured code snippets for popular feature requests like set a minimum word count, disable Gutenberg editor, change excerpt length, and more.

First, you’ll need to install and activate the free WPCode plugin. If you need help, then check out our guide on how to install a WordPress plugin.

Note: The free version of WPCode has everything you need to add custom code in WordPress. You can upgrade to the premium version of WPCode to get advanced features like conversion pixels, code revisions, and more.

Once the plugin is active, simply head over to Code Snippets » Library from your WordPress dashboard.

From here, search for the ‘Set a Minimum Word Count for Posts’ option and click the ‘Use snippet’ button underneath it.

Select the 'Set a Minimum Word Count' option from the snippet library

On the next page, you’ll see that WPCode has automatically added the code.

You may change the minimum number of words from 100 to whatever you like.

Edit the line to change the minimum word count

If you want, you can also customize the error message to make it more helpful or personalized.

Edit the error message for minimum word count

After that, simply toggle the switch from ‘Inactive’ to ‘Active’ and click the ‘Update’ button.

Switch the code snippet to Active and click Update in WPCode

That’s it!

Now, if you try to publish a blog post that’s below the word count limit (100 words in our example), then you’ll see a publishing error.

Publishing error for not meeting word count

If you’re an advanced user, you can also copy and paste the following code into your own functions.php file:

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');

We hope this article helped you learn how to set a minimum word count for a WordPress blog. You may also want to look at how to create an email newsletter the right way, or see our expert pick of the best payroll software for small business.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

15 CommentsLeave a Reply

  1. Dennis Muthomi

    I noticed there are red and orange buttons next to the Publish button in some of the screenshots. What do they mean and what do they do on the website?

    • WPBeginner Support

      Those are from our SEO plugin that gives us information about what we wrote :)

      Admin

  2. Dayo Olobayo

    Fantastic article! The AIOSEO plugin lets me know if my article is below 300 words, which looks good for me. I like the wpcode method above as well but I will not be implementing as I’m the only author on my website.

    Please do you mind showing me how I can set minimum word or character limit for visitors who comments on my articles?

  3. Jiří Vaněk

    Thanks for the snippet. The Yoast SEO plugin taught me not to create articles shorter than 300 words. Such a warning, visible at first glance, really comes in handy.

  4. Frank

    What are the red and orange buttons/counters in the top-right / right of the publish button?

    • WPBeginner Support

      Those are from our SEO plugin All in One SEO one is the headline analyzer while the other is the general SEO of the article :)

      Admin

  5. Antillais

    do you think this can work this gravity form plugin ?

  6. Jeff Bridgforth

    I assume you could edit this script and set it up for a maximum word count as well. Is this correct?

  7. Brandon Cox

    Ah, cool little trick! I can see it coming in handy on those mega-magazine blogs everyone wants to build.

  8. Mark Morgan

    Is there a way to do that with comments, too? A minimum comment size might improve the quality of them.

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.