sandywp / plugins / disable-search

Disable Search

4.7 out of 5 stars. 4.7 16 reviews

Disable the built-in front-end search capabilities of WordPress.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v2.1.1 30,000+ installs WP 4.6+

your-sandbox.sandywp.com/wp-admin
Disable Search running inside a SandyWP sandbox

About this plugin

This plugin prevents WordPress from allowing and handling any search requests from the front-end of the site. Specifically, this plugin:

  • Prevents the search form from appearing if the theme uses the standard get_search_form() function to display the search form.
  • Prevents the search form from appearing if the theme uses a searchform.php template
  • Prevents the search item from appearing in the admin tool bar when shown on the front-end.
  • Disables the search widget.
    • Removes the Search widget from the list of available widgets
    • Deactivates any search widgets currently in use in any sidebars (they are hidden, not deleted; they’ll reappear in their original locations if this plugin gets deactivated)
  • Disables the search block.
    • Removes the Search block from the list of available blocks
    • Deactivates any search blocks currently in use, such as in posts or as a widget (they are disabled, not deleted; they’ll reappear if this plugin gets deactivated and the associated placeholder block doesn’t get deleted)
  • With or without a search form, the plugin prevents any direct or manual requests by visitors, via either GET or POST requests, from actually returning any search results.
  • Submitted attempts at a search will be given a 404 File Not Found response, rendered by your site’s 404.php template, if present.
  • Disables output of SearchAction in SEO schema by the Yoast SEO plugin.

The plugin only affects search on the front-end of the site. It does not disable searching in the admin section of the site.

Links: Plugin Homepage | Plugin Directory Page | GitHub | Author Homepage

Questions

Will this disable the search capabilities in the admin section of the blog?

No.

Will this prevent Google and other search engines from searching my site?

No. This only disables WordPress’s capabilities with regards to search.

Search engines index your site and search their index of your site. They do not make use of your site’s native search capabilities. You can only prevent search engines from searching your site by blocking their web crawlers and purging their cache of your site (which is well beyond the scope of this plugin).

Why do I still see a search form on my site despite having activated this plugin?

The most likely cause for this is a theme that has the markup for the search form hardcoded into one or more of the theme’s template files (excluding searchform.php). This is generally frowned upon nowadays (the theme should be calling get_search_form() or using searchform.php to get the search form). There is no way for this plugin to prevent this hardcoded form from being displayed.

However, even if this is the case, the form won’t work (thanks to this plugin), but it will still be displayed.

Can the front-end search only be selectively disabled, allowing it to appear and work under certain conditions (such as only for logged-in users, etc)?

No, not at this time, though it is feature being considered. (In truth, custom coding could certainly be used to achieve this, but that obviously requires coding knowledge.)

Is this plugin GDPR-compliant?

Yes. This plugin does not collect, store, or disseminate any information from any users or site visitors.

Does this plugin have unit tests?

Yes. The tests are not packaged in the release .zip file or included in plugins.svn.wordpress.org, but can be found in the plugin’s GitHub repository.

4.7

16 reviews

  • 5 ★ 14
  • 4 ★ 1
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 1

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

  • Configure SMTP

    4.9 · 6K+ installs

    Configure SMTP mailing in WordPress, including support for sending email via SSL/TLS (such as Gmail).

  • One Click Close Comments

    4.9 · 5K+ installs

    Conveniently close or open comments for a post or page with one click from the admin listing of posts.

  • Text Replace

    4.4 · 3K+ installs

    Replace text with other text. Handy for creating shortcuts to common, lengthy, or frequently changing text/HTML, or for smilies.

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.