Set Minimal Comment Limit In WordPress

Comment on the blog shows how much your hard work pays off. This even encourages the discussions around your topic. However, it doesn’t matter the length of comment and they are not helpful.

But, if you are getting unlimited lengthy comments, then we will show you here how to stop or set Minimal Comment Limit in WordPress as in length.

Why Do You Need To Limit The Length Of The Comment?

As per our studies, we have found the appropriate length of comment around 60 characters and below 5000 characters. When the user writes a one-word comment, it is not useful.

It shows the users just need a backlink from your site. This comment considers as spam too. Mostly the best comment is short or not above 5000 characters, sounds genuine. If it above 5000, it is not relevant to your site. 

With the set limit in WordPress, you can easily improve the relevancy of your site and the quality of the website. 

Minimal Comment Limit in WordPress

So, let us take a look to set the limit of comment in WordPress.

How To Set Minimal Comment Limit In WordPress

Well, there are two methods to limit the comment length of WordPress. Both methods are easy to do, but you will need to follow up on all the details carefully. 

Method 1- Limit Comment Length By Using A Plugin

In the first step, you will need to install and activate the control comment length plugin.
Control comment length
This plugin helps to set a limit and it offers user interface from English to German English. With this, you can easily set the limit of characters 60 to 5000. 

Even you can add messages feature that will visible easily to the users, while their comment either short or long. This message will display in both English and German language, even you can replace this message with your own. 

To download the plugin, follow the steps:
– Go to dashboard then settings.
– Click on add new button and search for Control Comment length plugin.
– After installation activates it.
– Then do the required changes as per your need.

Method 2- Limit Comment Length By Using Snippet Code

If you failed in method 1 then you do not worry. You have another option to do that, Snippet code. If you are good at handling codes, then it will be very easy. You need to add Preprocess_comment.

This filter will run before any comment saves on WordPress. Here, you have to check the length limit, if the user trying to type the above limit, this will show the message or error. 

Code to add:

Add_filter ( ‘preprocess_comment’,’wpb_preprocess_comment’);
Wpb_preprocess_comment ($comment)
If (strlen($comment[‘comment_content’])>

The Final Verdict

Both ways are easy, you can opt for any one as per your interest. But make sure, you have a backup of the site before doing anything especially when you are not an expert. We hope with this article you will get the vest tips to limit the comment and boost the relevancy of your blog.

It’s quite daunting to handle everything, but thanks to WordPress plugins that lesser the workload. Good Luck!

Related Post: WordPress Comments Plugins for setting up commenting in your blogsite

About Sonnal S Sinha

Sonnal S SinhaSonnal S Sinha is a passionate writer as well as WordPress and WooCommerce rockstar who loves to share insights on various topics through his engaging blog posts. He run successful website design and digital marketing company. With 15+ years of experience in WordPress themes development, he strives to inform and inspire readers with his thought-provoking content. He helps thousands small and medium businesses and startups create a unique online presence. Follow Sonnal S Sinha for your regular dose of knowledge and inspiration.