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 Make Blog Post Comments Searchable in WordPress

Editorial Note: We earn a commission from partner links on WPBeginner. Commissions do not affect our editors' opinions or evaluations. Learn more about Editorial Process.

Do you want to make blog post comments show up in WordPress search results?

By default, WordPress search doesn’t include comments. This can make it difficult for visitors to find interesting conversations and engage with other users.

In this article, we will show you how you can make blog comments searchable on your WordPress website.

How to make blog post comments searchable in WordPress

Why Make Blog Post Comments Searchable in WordPress?

A lively and interesting comment section can keep people on your WordPress website longer and create a sense of community. With that in mind, you’ll want to do everything you can to get more comments on your WordPress blog posts.

WordPress doesn’t include comments in its search results by default, so visitors may struggle to find interesting discussions and connect with other users.

If you run an online store, then visitors may even use the comments to leave feedback and reviews. By making these comments searchable, you may be able to get more sales.

That being said, let’s see how you can make blog post comments searchable in WordPress. You can use the quick links below to navigate through the tutorial:

Step 1: Install and Set Up SearchWP

The easiest way to make blog post comments searchable in WordPress is by using the SearchWP plugin.

SearchWP is the best custom search plugin for WordPress, used by over 30,000 websites. It’s easy to use and lets you search content that WordPress doesn’t search by default.

For more information, check out our complete SearchWP review.

To make your blog post comments searchable, you’ll need to install and activate SearchWP. If you need more details, please see our guide on how to install a WordPress plugin.

SearchWP will now take you to the SearchWP » Settings page automatically.

On this screen, activate your SearchWP license key. You’ll find this information in the email you got when you purchased SearchWP and in your account on the SearchWP site.

Enter SearchWP license key

Step 2: Configure Your Search Engine to Make Comments Searchable

You are now ready to improve the WordPress search with SearchWP, so go ahead and click on the ‘Algorithm’ tab.

SearchWP search engines

Here, you can customize the content that SearchWP includes in its results. By default, posts are searchable and are broken into title, content, slug, and excerpt.

To search the comments on your WordPress blog, click on the ‘Sources & Settings’ button.

Clicking Sources and Settings in SearchWP

A popup will now show all the different types of content that SearchWP can search. You may see different options depending on the plugins you have installed.

For example, SearchWP can search WooCommerce products to create a smart WooCommerce product search. By default, the plugin searches your site’s posts, pages, and media.

Go ahead and check the ‘Comments’ box, then click ‘Done.’

Including comments in the SearchWP search engine

SearchWP will now include all comments in its search results. You can fine-tune how SearchWP searches your blog comments by scrolling to the bottom of the screen.

In the new ‘Comments’ section, click on the ‘Add/Remove Attributes’ button.

Adding or removing attributes in SearchWP

On this screen, you’ll see sections for the different content, such as the author’s name, email address, and comment text. You can now check and uncheck these boxes, depending on the content you want SearchWP to search.

In the following image, we are telling SearchWP to look at the comment’s content by checking the ‘Comment’ box, as well as the name and email address of the person who posted it.

Adding comment, author name, and author email sources to SearchWP

After making your selection, click on the ‘Done’ button. The options you selected will now appear in the ‘Comments’ section.

For each option, SearchWP has an ‘Applicable Attribute Relevance’ scale. This is the weight that SearchWP will give to each attribute when searching the comments on your blog.

Configuring the Applicable Attribute Relevance for Comments in SearchWP

Content that matches an attribute with high relevancy will appear higher in the search results. By contrast, content that matches an attribute that has less relevancy will appear lower in the user’s search results.

By default, all the attribute sliders are set to ‘low,’ but you can change that by dragging the slider to the right.

Every site is unique, so you may want to try different relevancy settings to see what gives you the most accurate and helpful search results.

If you want to remove an attribute from your search at any point, then simply repeat the steps above, but this time uncheck the box.

When you are happy with how the search is configured, scroll up and click on the ‘Save’ button.

Saving new SearchWP settings

Now, scroll down and click on the ‘Rebuild Index’ button.

This will add all your site’s comments to the search index so that they appear in relevant results.

Rebuilding the search index in SearchWP

Step 3: Create and Embed Your Search Form in WordPress

With the previous step done, comments will start appearing in your site’s search results. But to make sure users can access your search form, you need to create one first.

For more information, you can check out our step-by-step guide on how to create a custom WordPress search form.

How to create an advanced search form using SearchWP

Once your search form is ready, you can embed it anywhere on your WordPress website. For example, you can add a search bar to your WordPress menu, where users can easily see it no matter what page they’re on.

You can also add your search form to WordPress posts or pages to let readers do a quick search while engaging with your content.

It’s also possible to use multiple search forms in WordPress. This will be helpful if you want to create a search form for a specific custom post type, like WooCommerce products, and another for generic content like posts and comments.

Now that you know how to make your blog post comments searchable in WordPress, you can check out other articles to enhance your website’s search experience:

We hope this article helped you learn how to make blog comments searchable in WordPress. You may also want to see our picks of the best live chat software for small businesses and the ultimate guide to creating a WordPress membership site.

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

5 CommentsLeave a Reply

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. Jiří Vaněk says

    It never occurred to me that comments aren’t searchable using the standard WordPress search. Yet, comments are often an excellent additional source of information on a technical website. Thanks for the inspiration on what could be improved in website search, as comments often provide valuable additional information.

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.