Chris talks about a live client website that needed some additional search functionality in order to search for various file types.
Make WordPress search for files
Searching for binary data such as Word or PDF files is quite complex and the WordPress engine is not built to search for these types of files by default. Luckily there are plugins out there that we can configure to do that job for us.
I had already used a plugin to expand the default search functionality on a particular client website, unfortunately that plugin didn’t search for files. Upon looking for alternatives I came across the WPSearch plugin, however due to many custom fields, many documents already added to the media library and the fact that this particular client (a well-known global brand) would not be happy with any downtime at all, it would take some configuration and testing to make sure it sat nicely with the existing custom functionality that we had already put in place.
We needed to do some backup, configuration work and testing on a duplicate of the site, this consisted of duplication of the live website on a separate server, configuration of the plugin and testing of the WPSearch plugin to make sure it ran as expected. We then re-launched that duplicate copy of the website to the live server and tested again for any mishaps – keeping various backups along the way using the duplicator plugin.
It took around 6hrs to do this fully, which included all of the above site duplication, configuration, testing (to make sure that the plugin worked with the existing site and database) and re-launch and now the client has search functionality that looks for files and opens them in just one click.
A yearly fee exists for the WPSearch plugin of $49 – approx. £33 (based on current exchange rate).