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 Improve WordPress Search with SearchWP (Quick & Easy)

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 improve your WordPress search with SearchWP?

By improving the built-in WordPress search, you can help users find what they are looking for. This will keep them on your website for longer, improve the visitor experience, and get you more conversions.

In this article, we will show you how to improve your WordPress search with SearchWP easily.

How to improve WordPress search with SearchWP (quick & easy)

Why Improve WordPress Search With SearchWP?

WordPress has a built-in search feature, but it doesn’t always show the most accurate results. You also can’t customize this feature so that it prioritizes your site’s most important content.

This means that visitors may struggle to find what they’re looking for using your site’s built-in WordPress search.

That’s why we recommend using SearchWP.

SearchWP is the best custom search plugin for WordPress, used by over 30,000 websites. With SearchWP, you can make sure you are showing accurate results by creating a custom relevance scale and adjusting the search algorithm.

SearchWP also lets you make any part of your site searchable, including PDF files, custom tables, text files, WordPress custom fields, WooCommerce products, and much more.

The SearchWP WordPress search plugin

You also get access to detailed search metrics so you can see what visitors are searching for and the types of content they’re finding. This allows you to continuously improve your site’s search to deliver the most accurate results.

You can even use this data to generate new blog post ideas by seeing the kind of content visitors are looking for.

SearchWP metrics example

Plus, SearchWP automatically integrates with all major WordPress plugins like WooCommerce, bbPress, Meta box, Easy Digital Downloads, and more.

You can see our complete SearchWP review for more details.

With that said, let’s show you how to set up SearchWP to improve your WordPress search.

How to Install and Set Up SearchWP

The first thing you need to do is activate and install the SearchWP plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, go to SearchWP » Settings and then click on the ‘General’ tab.

How to activate the SearchWP WordPress plugin

Here, you need to enter your license in the ‘License Key’ box.

You can find this information in your account on the SearchWP site. Once you are done, make sure to click the ‘Verify Key’ button.

With SearchWP activated, you can now explore the many ways this plugin can improve your WordPress search. You can use the quick links below to navigate through the different topics:

Option 1: Create a Custom Search Algorithm

After activating the plugin, you can fine-tune how SearchWP indexes, searches, and displays your content. You can think of this as creating a custom Google search algorithm that’s just for your WordPress blog or website.

To get started, head over to SearchWP » Algorithm.

Creating a custom SearchWP algorithm for your website or blog

Here, you’ll see a section for the different content types that SearchWP searches by default, such as pages, posts, and media files.

Every section has an ‘Attribute Relevance’ slider that changes how your site’s search engine values and ranks that content.

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.

The applicable attribute relevance sliders

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.

When you are happy with how the search algorithm is set up, scroll to the top of the screen and click the ‘Save’ button.

SearchWP will now rebuild the index automatically. 

Building a custom search algorithm for your WordPress website or blog

Depending on the speed of your Internet connection and your WordPress hosting provider, this may take a few minutes.

As soon as you see ‘Index Status 100%,’ you’ll know that SearchWP has indexed your content.

Building the search index on a WordPress website

Option 2: Create a Custom Search Form

While the default WordPress search form is great, it’s not very advanced. At times, you may want to customize how the search form behaves so that it suits your website and users’ needs better.

Once you have created a custom search algorithm in SearchWP, you can go ahead and create your own search form. To do this, go to SearchWP » Search Forms and click the ‘Add New’ button.

Adding a custom search form to your WordPress website

This will add a new search form that is ready for you to edit and style. 

For example, you can change the placeholder text in the search field, choose a form style, change the font size, edit the button style, and so on.

Choosing a new form style using SearchWP

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

Once you have created a search form, you’re ready to add it anywhere on your WordPress website.

For example, you may want to add a search bar to the navigation menu. This is often the prime spot for adding a search function as users can easily spot it and then use it to find their desired information quickly.

Add a search bar to WordPress menu

Or, you could add the search form to your WordPress post.

This may come in handy if you want to allow users to explore other content once they’ve finished reading your blog post.

With SearchWP, you can create multiple search forms and embed them on different parts of your website, too. This way, you can have different search forms for different types of content.

Option 3: Make PDF Files Searchable in WordPress

PDFs are a great way to share information with your visitors. For example, many restaurant websites publish their menus as PDF files. You can even add a PDF viewer in WordPress, so customers and visitors can see the PDF’s contents without downloading it.

By default, the built-in WordPress search shows the title and description of your PDFs in its search results, but it doesn’t show the document’s contents.

To make your PDFs searchable, go to SearchWP » Algorithms. In the ‘Media’ section, click on the ‘Add/Remove Attributes’ button.

Adding and removing attributes to WordPress search

In the popup that appears, check the ‘Document Content’ box if it isn’t already selected.

This setting tells SeachWP to index the contents of your PDFs, Microsoft Office files, text files, and other documents in the WordPress media library.

You should also check the ‘PDF Metadata’ box. SearchWP will then index PDF metadata that isn’t part of the file’s contents, such as its title, author, subject, and keywords.

Searching PDF metadata with SearchWP

When you are happy with the changes you’ve made, click on the ‘Done’ button. ‘Document Content’ and ‘PDF metadata’ will now appear in the ‘Media’ section.

You’ll notice that each item has an ‘Applicable Attribute Relevance’ scale.

By default, the sliders for Document Contents and PDF Metadata are all the way to the left, so they don’t carry much weight. If you want the document content and PDF metadata to have a bigger impact on the search results, then simply move the sliders.

Changing the content relevancy of a PDF search feature

With that done, don’t forget to click on ‘Save’ to rebuild the index and include relevant PDFs in the search results.

For more detailed instructions, please see our guide on how to add PDF indexing and searching in WordPress.

Option 4: Add a Search By Category Feature to WordPress

If you have multiple categories on your WordPress website, then you might want to let users restrict their search to a specific category. For example, if you have an online store, then customers may want to search within a particular product category.

You can do this by adding a category dropdown to your search forms.

Category select drop down example

For more details, see our guide on how to search by category in WordPress.

Option 5: Add a Live Ajax Search Function to WordPress

Another feature you’ve probably seen is live Ajax search, also called instant search. This adds a dropdown autocomplete feature, just like you see in search engines like Google.

Instant search helps your visitors find what they are looking for more quickly, and SearchWP makes it easy to add this feature to your website.

Live Ajax search widget example

For more details, see our guide on how to add live Ajax search to your WordPress site.

Option 6: Add a Smart Product Search to Your Online Store

If you run an online marketplace, then you’ll want to help visitors find the products they are looking for, fast.

SearchWP WooCommerce search results

SearchWP makes it easy to improve your product search and get more sales.

You can even customize the WooCommerce search engine and give extra weight to the product attributes that matter most.

Add WooCommerce search product attributes

For more details, see our guide on how to make a smart WooCommerce product search.

Option 7: Create a Custom Post Type Search Form in WordPress

With SearchWP, you can create all kinds of search forms, including an advanced search form for custom post types.

To do this, you’ll create a separate search form that looks at your custom posts only by going to SearchWP » Search Forms. Here, click the ‘Add New’ button.

Adding a search form to a WordPress website

You can now give the form a descriptive title.

This is just for your reference, so you can use anything that helps you identify the form in your WordPress dashboard. This is particularly important if you plan to create multiple search forms in WordPress.

Adding a title to a custom post type form

By default, the form will search media, pages, and posts and ignore custom post types.

To include custom post types, you need to find the ‘Type of search’ field and give it a click.

Creating an advanced search form using SearchWP

You can now type in the name of each custom post type.

When the right post type appears, give it a click to add it to the search.

How to add custom post types to the WordPress search results

Do you want to search custom post types only and ignore all other content?

Then just click the small ‘X’ next to ‘Media’, ‘Pages’, and ‘Posts’.

Excluding content from the WordPress search results

With that done, the form will search your custom post types only.

You can now style the form by changing the font size, colors, button style, and more. For more details, see our guide on how to create advanced search forms for custom post types.

When you are happy with how the form is set up, scroll to the top of the screen and click on ‘Save’ to store your settings.

Saving a custom search form

Now, you can add the search form to any page, post, or widget-ready area using the Search Form block.

Simply head to the area where you want to show the form. Then, click on the ‘+’ button and type in ‘Search Form.’

Adding a custom search form to a page or post

When the right block appears, give it a click.

Next, open the ‘Select a Form’ dropdown and choose the search form you want to display.

Adding an advanced search form to a website or blog

When you are ready to make the search form live, simply click on either ‘Update’ or ‘Publish’. Now, you can visit your website to see the search form in action.

Option 8: Make Blog Post Comments Searchable

Have you ever left a thoughtful comment on a blog post, only to forget exactly where it was later? Maybe you wanted to revisit the discussion to add another thought, or perhaps you were eager to see if someone replied to your comment.

Unfortunately, with the default WordPress search, finding that specific comment can be like searching for a needle in a haystack. Thankfully, SearchWP lets you easily index and search comments alongside your regular posts and pages.

This means users can find relevant comments much faster, potentially leading to increased engagement and helping them discover valuable insights you might have missed.

To make blog post comments searchable in WordPress, you can edit your default search algorithm like we’ve shown you in option 1. Then, go ahead and check the ‘Comments’ box, and then click ‘Done.’

Including comments in the SearchWP search engine

From there, you can configure the ‘Applicable Attribute Relevance’ scale of the comments.

You may want to try different settings to see what works best for your blog.

Configuring the Applicable Attribute Relevance for Comments in SearchWP

For detailed instructions, check out our guide on how to make blog post comments searchable in WordPress.

Discover More Ways to Make the Most of SearchWP

There are actually a lot more ways to improve your WordPress search we cannot go through them all in this article. But if you’re interested, check out the articles below:

We hope this article helped you learn how to improve WordPress search with SearchWP. You may also want to see our picks of the best live chat software for small businesses and our guide on how to get a free business email address.

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

11 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. Moinuddin Waheed says

    I am a bit confused about the terminology custom post type in ajax search.
    I mean we can categories and then set the search based on these categories.
    so what is the main difference between category search and custom post type search?
    and which one is to use for displaying woo commerce products for search?

    • WPBeginner Support says

      A custom post type search would include any custom post types you have on your site and that would include WooCommerce if you wanted but the plugin also has WooCommerce specific searches.

      Admin

  3. Rebecca says

    I do not add PDFs through the Media library. Instead, I upload my files through the content Upload folder. I have to do it this way because these documents are frequently changed and it is easier to manage and update this way. Is there a way to make SearchWP index PDFs using this method, or does it have to be done through the media library?

  4. Jon says

    Will this tool also index other filetypes? Like a word document? I’m looking for something to search/index text, word, pdf documents (resumes) that are uploaded.

  5. Pippin Williamson says

    I’ve started using SearchWP on my own site and have to say the results are phenomenal.

  6. Mike says

    I would love to see a tutorial on how to replace WP’s search with a Google Custom search so as to garner a bit of AdSense cash from the search. Have I just overlooked a plugin for that, or is there an easy way to do this without a plugin.

    Thanks, learning lots from your site and I have used WP since 2006!

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.