How to add search to your website: five ways, what they cost and where they stop working
There are five ways to add search to a website. You turn on your CMS’s built-in search, write a script that queries the database, embed Google’s search box, run your own search engine, or connect a cloud service. A blog, a services site or a store with a couple of hundred products can live with a free option: built-in search or Google’s box. Once the catalog has thousands of items and shoppers type plurals, typos and SKUs, two paths remain: your own engine with an engineer to run it, or a cloud service that starts at about $20 a month.
Five ways in one table
| Method | Cost | Effort | Who it fits | Where it stops working |
|---|---|---|---|---|
| Built-in CMS search | $0 | turn it on in settings or add a block | content sites, catalogs of a few hundred products | it compares strings: a plural, a typo or a different word gives an empty page |
PHP script with LIKE or FULLTEXT |
$0 plus developer time | hours for the first version, then ongoing fixes | custom CMS, small catalog | the same plurals and typos; LIKE '%…%' can’t use an index and scans the table on every query |
| Google Programmable Search Engine | free with ads; ad-free only for nonprofits, schools and government bodies | paste code into the template | blogs, knowledge bases, documentation | searches only pages in Google’s index; prices and stock update when Googlebot comes back |
| Your own engine: Elasticsearch, OpenSearch, Meilisearch, Typesense, Manticore | servers plus engineer time | about a month to a working storefront in our experience, then maintenance | teams with their own engineer, or data that can’t leave your servers | the engine stores the index; you build language handling, the search UI, sync and analytics |
| Cloud search for stores | Veera: free up to 300 products, paid plans from $20 a month | a connector or a feed, plus one line of code | stores with thousands of products and no search engineer | you depend on the vendor; with a feed, the catalog is only as fresh as the feed, from 15 minutes |
Third-party terms are taken from the vendors’ official pages as of September 2026.
Built-in CMS search compares strings
Almost every CMS has built-in search. The easiest way to see how they differ is the source code: it says exactly how a query is matched against a product.
WordPress splits the query into words and looks for each one with LIKE '%word%' in the post title, excerpt and content. That’s the parse_search method in the WP_Query class. WooCommerce uses the same mechanism to find products until you install a search plugin. OpenCart 3.0 checks words with LIKE against the product name, and compares the model, SKU and barcodes only as whole values (source code). A fragment of an SKU is found only if the SKU is part of the name.
CS-Cart’s built-in search also looks for the query as a substring of the product name. Type “laptop” with one extra letter, and it returns an empty page even when hundreds of laptops are in stock.
The ceiling of built-in search is the empty results page, and the bigger the catalog, the more often shoppers hit it: a plural, a typo, a brand spelled differently.
A PHP script: why LIKE is a poor search
When the built-in search stops being good enough, a developer writes a custom one. Most PHP site-search scripts come down to one line: SELECT … WHERE name LIKE '%query%'. It’s quick to write, and the first tests look fine. The trouble starts when real shoppers arrive.
Take the product “Nike Pegasus 41 Men’s Running Shoes, SKU PG41-001” and see what such a script finds.
| The shopper typed | Result of LIKE '%query%' |
Why |
|---|---|---|
| running shoes | found | the phrase matches the name |
| shoes running | not found if the whole phrase is matched | different word order |
| mens running shoes | not found | the name says “Men’s” |
| runing shoes | not found | a missing letter |
| trainers | not found | the British word for the same shoes |
| pg41001 | not found | the SKU in the card has a hyphen |
| ring | finds “Earrings” and “Spring jacket” | a substring inside other words |
Splitting the query into words, as WordPress does, fixes word order. Nothing else in the table can be fixed with LIKE. On top of that, a LIKE pattern that starts with % can’t use a regular index: on every query the database reads the rows one by one, and if descriptions are searched too, it reads every text in the catalog.
The developer’s next step is a MySQL full-text index with MATCH … AGAINST. It matches whole words and sorts by relevance. It has no stemming, so “shoe” and “shoes” are different words. The * operator in boolean mode helps: shoe* finds both. By default the index skips words shorter than three characters in InnoDB and four in MyISAM (documentation), so queries like “TV”, “LG” and “4K” get lost unless you change the server settings.
A full-text index also needs looking after. In August 2026 one of our MySQL servers stopped responding: queries to its tables queued for many minutes, and the error log pointed at InnoDB’s background full-text optimizer. The index sat on a table of about 40,000 rows, and not a single query in the code used it. We dropped it.
A custom script makes sense when the CMS is your own, the catalog is small and you need logic no ready-made tool has. Word forms can be added with a stemming library. Typos, synonyms and ranking the developer still writes by hand.
Google’s search box: free, but limited to Google’s index
Google gives you code for a search box that goes into your site template. Results come from Google’s index, so search sees your site the way the crawler does: a new page shows up after it’s indexed, and a page closed to crawlers never shows up.
Since January 20, 2026, new Programmable Search Engines search only a list of sites, up to 50 domains (help). For your own site that’s enough. The JSON API, which let you show results in your own design, is closed to new customers, and existing users have to move off it by January 1, 2027. Without ads, the search box is free only for nonprofits, schools and government organizations (help).
For a blog, a knowledge base or documentation, this is a working free option. For a store the ceiling is low: price and stock in the results update only when the crawler visits the page again.
Your own engine: you get an index, the rest is on you
When a search box from Google isn’t enough, developers usually suggest running your own engine. Elasticsearch, OpenSearch, Meilisearch, Typesense and Manticore store a search index and answer queries over an API. They know nothing about products, stock or storefronts. Their licenses and language handling differ. As of September 2026:
| Engine | License | Language handling | Worth knowing |
|---|---|---|---|
| Elasticsearch | AGPLv3, SSPL or Elastic License 2.0; some features only under the Elastic License | built-in language analyzers, such as english with a stemmer |
the vendor sells a managed version, Elastic Cloud |
| OpenSearch | Apache 2.0 | the same kind of language analyzers | managed clusters from AWS and other cloud providers |
| Meilisearch | MIT; sharding under BUSL-1.1 | typo tolerance and prefix search out of the box | hosted Meilisearch Cloud from the vendor |
| Typesense | GPLv3 | Snowball stemming, turned on in the collection schema | hosted Typesense Cloud from the vendor |
| Manticore | GPLv3 or later | stemmers and a dictionary-based lemmatizer; dictionaries are installed as a separate package | a fork of Sphinx 2.3.2, made in 2017 |
A stemmer is not the same as morphology. It cuts off endings by rule and doesn’t know words. “Batteries” and “battery” end up with the same stem. “Mice” and “mouse” don’t, and neither do “knives” and “knife”. A shopper types “computer mice” and doesn’t find “Wireless Mouse” until someone adds a dictionary on top of the stemmer.
A lemmatizer checks a dictionary and reduces a word to its base form: dictionary-based lemmatizers map “mice” to “mouse”. That’s a separate component you install and maintain.
Our CS-Cart search add-on ran on Elasticsearch hosted on clients’ own servers for years, so we know the workload from our own logs. The developer writes the field mapping, analyzers, synonyms, facets, suggestions, a search window that works on phones, and the catalog export. In our experience it takes about a month to get to a working storefront. Then comes maintenance, full of small things the tutorials don’t cover:
- on a single server, an index with a replica sits in yellow status by default because the replica has nowhere to go, and you set the replica count to zero by hand;
- a full reindex of a mid-size catalog takes minutes, and you have to run it on a live store;
- in an electronics store, the ERP sync puts the whole catalog back in the queue many times a day, and search has to keep answering while the queue drains;
- on the Plaza.hu marketplace, part of the catalog was never linked to the index and the update queue ran hours behind. The storefront kept working, and from the outside nobody saw the gap (case study).
The money goes into servers and engineering time. The cluster is only the start: language handling, the search window and catalog sync are yours to build. We ran the numbers for your own Elasticsearch in the comparison with Veera.
Your own engine makes sense when your team already has an engineer who runs a cluster for other work, when data can’t go to an outside service, or when search is part of your own product.
A cloud service: everything except the catalog is already built
A cloud service takes over the part an engineer would build on your own engine: the index, language handling, typos, the search window and query reports. You keep the catalog and one line of code in the template.
In Veera, the catalog arrives through the Veera Connector for WooCommerce, CS-Cart or OpenCart. Other platforms connect through a Google Merchant or CSV feed (all integrations). Changes from a connector go into a queue that the service processes every 5 minutes. A feed is read on a schedule, from every 15 minutes to once a day. The widget goes in with one line before </body> and finds your site’s search field on its own. With our guides, setup takes 10 to 20 minutes.
The cloud runs the same search logic as our Elasticsearch add-on for CS-Cart, on OpenSearch instead of Elasticsearch. Typo tolerance is on from the start: “laptop” typed with one extra letter finds the laptops, not an empty page.
Veera Search pricing by catalog size: free up to 300 products, $20 a month for up to 5,000, $35 for up to 25,000, $65 for up to 100,000 and $150 for up to 300,000 (pricing). Every search feature is on every plan. You can try the Growth plan free for 30 days without a card. The index is stored on our servers in the EU, at Hetzner in Finland.
The cloud has a ceiling too. Search depends on the vendor, so check what the SLA promises and on which plans (our SLA). With a feed connection, price and stock in search are only as fresh as the feed. Catalogs over 300,000 products and B2B pricing by contract go to Enterprise, which we agree on separately.
When you don’t need a cloud service
If your site has articles, services or a few hundred products, use built-in search or Google’s box and skip the subscription: shoppers there browse through the menu anyway. A team whose engineer already runs an OpenSearch cluster for logs should price out a product index in that same cluster.
Test your search with eight queries
Whatever you choose, test it on the queries where search breaks. Take a popular product from your catalog and type into the search box:
- the name exactly as it appears on the product page;
- the same words in a different order;
- the name in the plural or the singular, including irregular forms: “batteries”, “mice”;
- the name with a letter missing or one extra;
- a word shoppers use but your catalog doesn’t: “sneakers” for “trainers”, “couch” for “sofa”;
- the brand misspelled: “samsng”, “addidas”;
- the SKU without hyphens or spaces;
- a short word that hides inside other words: “ring”, “cap”.
The first seven should find the product. The eighth should not drag in unrelated ones. Every empty page here is a shopper who left with that query. If you already have search and it misses things that are in stock, start with why site search stops working.
Frequently asked questions
How do I search a web page with a keyboard shortcut? To find a word on the page you have open, press Ctrl+F on Windows or Cmd+F on a Mac (Chrome help). In a mobile browser, use “Find in page” in the menu. That’s the browser’s own search: it works only on the open page, and the site doesn’t need to do anything for it.
How do I add search to a Wix, Squarespace or Webflow site? All three have built-in site search you can turn on. For a catalog with typos and SKUs, you send the products to an external service as a feed and add its widget through the builder’s custom code. Step by step: the article on site search for website builders and the widget page.
How do I improve WooCommerce search? WooCommerce uses WordPress search, which matches each word as a substring of the title and text. What you can tune and when you need a plugin is covered in the article on WooCommerce search. Veera connects through the Veera Connector plugin.
Can site search have filters? Yes. Search engines and cloud services return facets along with the products: categories, brands, price and attributes, and the Veera window shows them next to the results. How to set up filters in the catalog itself is covered in the article on product filters.
Which search plugin should I use on WordPress? A blog is fine with built-in search. A WooCommerce store needs a plugin that sends the catalog to an external engine. Ours works with WordPress 6.5 or later and WooCommerce 8.0 or later, and search is billed by plan.
Run the eight queries on your search. If many of them come back empty, connect your catalog to Veera on a free trial and type the same queries into our window: 30 days, no card needed.