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.
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.
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.
When you’ve set the number of words writers should complete, simply scroll down and click the ‘Save Changes’ button.
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.
Once your content meets the minimum word count, the checklist task will show a green checkmark, and authors can publish the blog post.
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.
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.
If you want, you can also customize the error message to make it more helpful or personalized.
After that, simply toggle the switch from ‘Inactive’ to ‘Active’ and click the ‘Update’ button.
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.
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.
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
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?
WPBeginner Comments
We happen to have a guide here on how to limit the comment length: https://www.wpbeginner.com/wp-tutorials/how-to-limit-comment-length-in-wordpress/
Dayo Olobayo
This is a timely and helpful article. I’ve been searching for it for quite some time now without help. Thank you!
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.
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
Antillais
do you think this can work this gravity form plugin ?
Frank Mulder
Wohaa! I’ve been looking for this for a long time! Tnx!
Jeff Bridgforth
I assume you could edit this script and set it up for a maximum word count as well. Is this correct?
Editorial Staff
Yes you can do that as well.
Admin
AJ Clarke
Yea, don’t you just turn the bracket around ( more)
Brandon Cox
Ah, cool little trick! I can see it coming in handy on those mega-magazine blogs everyone wants to build.
Mark Morgan
Is there a way to do that with comments, too? A minimum comment size might improve the quality of them.