If you’re running a WooCommerce store, then allowing users to search by SKUs is a great way to help customers find the right products.
However, it might not work properly at times due to different reasons.
Solving this problem is important to ensure a positive user experience for your customers and increase your sales.
In this article, we’ll show you how to find out why search by product SKUs doesn’t work on your site and how to fix this issue.
Since this tutorial contains a lot of helpful tips, we’ve organized it into several sections for you. Feel free to click on a specific section to skip ahead:
Why WooCommerce Search by SKU Does Not Work?
Let’s look at 2 of the most common cases why search by SKU of WooCommerce products might not work on your site.
WordPress Doesn’t Search by WooCommerce Products SKUs on Site
To begin, SKU stands for stock keeping unit. This is a unique product ID you’re free to specify the way you want. By assigning it to a product, you can help your customers to find it faster.
The main reason you can’t find a product by SKU is that WooCommerce stores this data in custom fields.
Custom fields are fields where you can add any extra information to your posts, pages, or products.
Apart from SKUs, WooCommerce also stores in custom fields product price, weight, color, and many other attributes.
This is valuable data, adding which can make it much easier for your customers to find the products they’re looking for.
But, there is a problem. WordPress doesn’t consider custom fields when performing a search by default.
Thankfully, you can handle this issue with a couple of clicks.
Search by WooCommerce Products SKUs Doesn’t Work in the Admin Panel
WooCommerce supports searching for products by their SKUs in the admin panel by default.
So if you can’t find your products, it means that your plugin doesn’t work correctly.
A list of possible reasons why this might happen includes:
- Plugin conflict: Some of the plugins you use on your site may not be compatible with each other.
- Import a large number of products via CSV: If you uploaded tons of products at once through a CSV file import, it could have corrupted the WooCommerce database.
- Hosting memory limit: Some web hosting services have hidden memory limitations that may cause WooCommerce not to work properly.
With that, let’s see how you can quickly fix these issues.
Fix WooCommerce Search by SKUs Doesn’t Work on Site
The easiest way to enable search by product SKUs on your site is to use a plugin like SearchWP.
It is the most powerful and easy-to-use WordPress search plugin on the market.
Using this plugin, you can make any additional info about your products searchable – no technical knowledge needed.
But this is only a small part of SearchWP features. In fact, with this plugin, you can create custom search forms, prioritize specific products in search results, and much more.
Over 50,000 eCommerce websites are already using SearchWP to give their customers more relevant search results.
Here are a few more amazing things that you can do with this plugin:
- Display search results in live mode: Want to show search results to visitors in live mode? With SearchWP, you can add live search with autocomplete feature to your site in a few clicks.
- Track searches on your site: Wondering what products your customers were looking for on your site? SearchWP collects data on search activity in your store so that you can better understand your audience’s needs.
- Add a search bar with a shortcode: Looking for a way to add a search bar to your site? With SearchWP, you can display a search bar using a shortcode at almost any place on your site.
- Enable search by partial matches: Want your visitors to find the right product, even if they enter its name with a typo? Enable SearchWP fuzzy search feature to make it easier to find products in your store.
With that, let’s see how you can use SearchWP to enable searching by WooCommerce product SKUs on your site.
Step 1: Install and Activate SearchWP
To get started, you can get your own copy of SearchWP by visiting the site and signing up for a new account.
The next step is to sign in to your SearchWP account and navigate to the Downloads tab.
Once you’re there, simply press the Download SearchWP button to begin downloading the plugin’s ZIP file to your computer.
After you finish downloading, you should also copy the plugin license key at the bottom left on the same tab.
The next step is to upload the SearchWP plugin’s ZIP file to your site.
Not sure how to do that? You can follow this step-by-step guide on how to install a WordPress plugin.
Once SearchWP is installed and activated, you will see the setup wizard. Go ahead and click the ‘Start Onboarding Wizard’ button and follow the onscreen instructions.
Step 2: Install the WooCommerce Integration Extension
Next, you can head to SearchWP » Extensions from the WordPress dashboard and navigate to the WooCommerce Integration extension.
This extension ensures seamless integration of SearchWP and WooCommerce plugins.
From here, simply press the Install button.
After that, you can move on to the next step and start customizing your site’s search engine.
Step 3: Make Custom Fields Searchable on Your Site
To get started, you’ll need to visit the SearchWP » Algorithm page from your WordPress dashboard.
By default, there is only one search engine called Default. Any changes you make to it apply to all existing search boxes on your site.
With SearchWP, you’re free to fully customize a search engine to meet your needs. For example, you can specify what search sources WordPress should consider, which pages exclude from search, and more.
SearchWP also allows you to create multiple search engines and link them to individual search forms.
In this tutorial, we’ll show you how to make WooCommerce product SKUs searchable using any search box on your site.
The first step is to add WooCommerce products to the Default search engine’s list of search sources. To get started, press the Sources & Settings button.
Next, a small window will open with sources for the default engine. These include posts, pages, and media.
From here, you can tick the box next to the Products source and click ‘Done’ to save the changes.
Once you’ve added WooCommerce products as a search source, the next step is to make WordPress consider SKUs.
To get started, click on the Add/Remove Attributes button under the Products section.
A small window will now open where you can select custom fields and taxonomies to include in the search process.
Go ahead and select _sku from the dropdown menu under Custom Fields.
Once you’ve finished, press Done to save the changes.
The last step is to click the Save Engines button in the upper right corner to save all the changes you’ve made.
Now let’s try out how search by SKU works on your site.
Step 4: Test Your New Search
To do that, simply visit your WooCommerce store and head to the search bar or form.
For the purposes of this tutorial, we’ve added to our test site a product called Mountain bike, which has “MB7534” as the SKU.
Let’s see if we can find this product by SKU alone.
As you can see, we found the product.
It means that search by WooCommerce product SKUs now works on our test site.
Fix WooCommerce Search by SKUs Doesn’t Work in The Admin Panel
Now let’s see what you can do if search by WooCommerce product SKUs doesn’t work in the admin panel.
Fix Plugin Compatibility Issue
The most common reason for that is plugin incompatibility.
To find out if it’s your case, you first need to disable all the plugins installed on your site.
To get started, navigate to the Plugins tab in your WordPress dashboard.
Then, tick a checkbox next to every installed plugin except for WooCommerce, SearchWP, and its extensions.
When you’re finished, select the Deactivate option from the drop-down menu and press Apply.
Try to search by a product SKU after these actions. If it works correctly now, then the problem was in the plugin incompatibility.
You can start activating plugins one by one to find out which one is causing problems with search.
If product search in the WooCommerce admin panel still doesn’t work, you can also try the following solutions below.
Fix WooCommerce Products Database Corruption
Recently uploaded a large number of products using the CSV file import?
In this case, the problem with search in the admin panel may be related to corruption of the WooCommerce database.
You can update your product database to fix this problem.
To get started, navigate to WooCommerce » Status from your WordPress dashboard.
Then, switch to the ‘Tools’ tab.
From here, you can scroll the page down to the Product lookup tables section and click Regenerate.
After that, scroll down to the Update database section.
From here, you can press the Update Database button at the appropriate section.
When you’re done, wait for a couple of minutes to let WooCommerce finish updating the database.
Then check if the search in the admin panel has started working properly.
If updating the database didn’t help, try the following method below.
First, navigate to Products » All Products in your WordPress dashboard.
From here, you can highlight the products visible on the page by checking the topmost checkbox.
Then, click on the Bulk actions drop-down menu at the top.
Next, you can choose the Edit option, and press Apply.
After that, click the Update button to update all your products at once.
It’ll make WooCommerce reindex all products and help solve problems with their display in search in the admin panel.
How to Deal with Hosting Memory Limitations
Another possible reason that can cause problems with search in the admin panel is hosting memory limitations.
Typically, you don’t have access to the hosting configuration options and can’t increase the memory limit yourself.
So the only way to solve the problem is to contact your hosting support team.
They’ll help you to figure out if it’s your case and increase the memory limit if it’s necessary.
What’s Next…
By fixing SKU searchin WooCommerce, you allow your customers to find the products they’re looking for faster and increase your sales.
We hope this article helped you learn how to fix Woocommerce search by SKU not working. You may also want to see our guide on how to fix WooCommerce product search not working and how to search by WooCommerce product attributes.
If you’re ready to fix not working search by WooCommerce products’ SKU on your site, then you can grab your copy of SearchWP here.