A free to use WordPress plugin that will allow you to disable the search function in WordPress. When you remove the search bar from your site, the search function can still be accessed by adding “/?s=searchterm” to the website URL in the address bar. This plugin will disable the search function and serve your 404 page instead when a search is initiated. This does not impact search engine indexing, it just disables the site search function on your website. Extremely light weight, just a few lines of code. Install and activate, there are no settings, it simply works.