Disable Search


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


  1. Install via the built-in WordPress plugin installer. Or install the plugin code inside the plugins directory for your site (typically /wp-content/plugins/).
  2. Aktiviere das Plugin im „Plugins“-Menü in WordPress


Wird dies die Suchmöglichkeiten im Adminbereich des Blogs deaktivieren?


Wird dies Google oder andere Suchmaschinen vom Durchsuchen meiner Website abhalten?

Nein. Dies deaktiviert lediglich die Möglichkeiten von WordPress in Bezug auf die interne Suche.

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).

Warum sehe ich immer noch ein Suchformular auf meiner Website, obwohl das Plugin aktiviert ist?

Die wahrscheinlichste Ursache hierfür ist ein Theme, bei dem das Markup für das Suchformular in einer oder mehreren Theme-Template-Dateien (ausgenommen die searchform.php) fest hinterlegt wurde. Das ist heutzutage eigentlich verpönt (das Theme sollte stattdessen get_search_form() oder die searchform.php zur Integration des Suchformulars einbinden). Es gibt keinen Weg für dieses Plugin, die Anzeige dieser fest hinterlegten Formulare zu unterbinden.

Auch wenn dies der Fall ist, wird das Formular (dank dieses Plugin) nicht funktionieren, es wird lediglich noch angezeigt.

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.

Enthält dieses Plugin Unit-Tests?



2. Januar 2022
Love this plugin! Really didn't want a search bar on my site and this took care of the problem. I have used this plugin for about a year with no hiccups at all. Thank you for developing it!
17. September 2021
I was looking for hours to hide the search form in the theme I am using. This plugin worked in 2 clicks: install and activate Really great!!
Alle 13 Rezensionen lesen

Mitwirkende & Entwickler

„Disable Search“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin mitgewirkt:


„Disable Search“ wurde in 4 Sprachen übersetzt. Danke an die Übersetzerinnen und Übersetzer für ihre Mitwirkung.

Übersetze „Disable Search“ in deine Sprache.

Interessiert an der Entwicklung?

Durchstöbere den Code, sieh dir das SVN Repository an oder abonniere das Entwicklungsprotokoll per RSS.


2.0.1 (2023-09-02)

  • Change: Safeguard JS from throwing error if WP JS isn’t loaded (should be rare to never)
  • Change: Note compatibility through WP 6.3+
  • Change: Update copyright date (2023)
  • Change: Tweak code alignment
  • New: Add .gitignore file
  • Unit tests:
    • Fix: Allow tests to run against current versions of WordPress
    • New: Add composer.json for PHPUnit Polyfill dependency
    • Change: Prevent PHP warnings due to missing core-related generated files

2.0 (2021-09-13)


  • This release finally addresses disabling the search block, notes compatibility through WP 5.8+, and restructures unit test directories.


  • New: Disable the search block
    • New: Add disable_core_search_block() to unregister block via PHP
    • New: Add enqueue_block_editor_assets() to register JS script to unregister search block via JS
    • New: Add JS script file to unregister search block
    • Change: Update documentation to reflect search block being disabled
  • Change: Remove get_search_form() and simply use __return_empty_string() as callback to 'get_search_form' filter
  • Change: Note compatibility through WP 5.8+
  • Change: Tweak installation instruction
  • Unit tests:
    • Change: Restructure unit test directories
      • Change: Move phpunit/ into tests/
      • Change: Move phpunit/bin into tests/
    • Change: Remove ‚test-‚ prefix from unit test file
    • Change: In bootstrap, store path to plugin file constant
    • Change: In bootstrap, add backcompat for PHPUnit pre-v6.0

1.8.3 (2021-05-01)

  • Fix: Change __wakeup() method visibility from private to public to avoid warnings under PHP8
  • Fix: Throw an error when attempting to unserialize an instance of the class to actually prevent it from happening

Full changelog is available in CHANGELOG.md.