Title: Disable Search
Author: Scott Reilly
Published: <strong>11. juni, 2009</strong>
Last modified: 14. april, 2025

---

Søg plugins

![](https://ps.w.org/disable-search/assets/banner-772x250.png?rev=1091055)

![](https://ps.w.org/disable-search/assets/icon-128x128.png?rev=1091061)

# Disable Search

 Af [Scott Reilly](https://profiles.wordpress.org/coffee2code/)

[Download](https://downloads.wordpress.org/plugin/disable-search.2.1.1.zip)

 * [Detaljer](https://da.wordpress.org/plugins/disable-search/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/disable-search/#reviews)
 *  [Installation](https://da.wordpress.org/plugins/disable-search/#installation)
 * [Udvikling](https://da.wordpress.org/plugins/disable-search/#developers)

 [Support](https://wordpress.org/support/plugin/disable-search/)

## Beskrivelse

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](https://wordpress.org/plugins/wordpress-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](https://coffee2code.com/wp-plugins/disable-search/) | [Plugin Directory Page](https://wordpress.org/plugins/disable-search/)
| [GitHub](https://github.com/coffee2code/disable-search/) | [Author Homepage](https://coffee2code.com)

## Installation

 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. Activate the plugin through the ‘Plugins’ admin menu in WordPress

## FAQ

### 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](https://github.com/coffee2code/disable-search/).

## Anmeldelser

![](https://secure.gravatar.com/avatar/db3ad0ccf1df46b9d35ca9872bac675eac1e98c3e0c44043a92440ce4c21ffe9?
s=60&d=retro&r=g)

### 󠀁[nice](https://wordpress.org/support/topic/nice-4990/)󠁿

 [kojot](https://profiles.wordpress.org/kojot/) 27. februar, 2026

super

![](https://secure.gravatar.com/avatar/07822699c15523e9220d6c2970a05a52d1ac7f567b7483b4f76777feef6fb979?
s=60&d=retro&r=g)

### 󠀁[Magnificent little plugin](https://wordpress.org/support/topic/magnificent-little-plugin/)󠁿

 [awesiome](https://profiles.wordpress.org/awesiome/) 28. oktober, 2024

Does exactly what it says. Just activate and it completely disables all default 
WordPress search functionality from the frontend.

![](https://secure.gravatar.com/avatar/bce40e97210b52eae7cd03c41e160d2e971fedea0dc4264f1d2da077ac3e9a96?
s=60&d=retro&r=g)

### 󠀁[The most effective way to avoid search spam](https://wordpress.org/support/topic/the-most-effective-way-to-avoid-search-spam/)󠁿

 [Fumiki Takahashi](https://profiles.wordpress.org/takahashi_fumiki/) 1. maj, 2024

In 2024, numerous bots are crawling sites, generating significant search spam. Generally,
site search incurs high costs, primarily because we end up paying for CPU resources
consumed by spam. If site search is not crucial for your website, I recommend activating
this plugin. Thank you, Scott, for maintaining this simple yet effective plugin!

![](https://secure.gravatar.com/avatar/c80675b02651e88229e4bca0c79d31115ac879ab73274801072df4a75ce79e15?
s=60&d=retro&r=g)

### 󠀁[Handful](https://wordpress.org/support/topic/handful/)󠁿

 [Dennis](https://profiles.wordpress.org/1404iran/) 9. februar, 2022

Simple and Very Handful

![](https://secure.gravatar.com/avatar/b226d6d8ef99933d3fb472657ae395664763c8cebb47cba51167f2380fb661cd?
s=60&d=retro&r=g)

### 󠀁[Easy to Use! Works Flawlessly!](https://wordpress.org/support/topic/easy-to-use-works-flawlessly-3/)󠁿

 [aliakey7](https://profiles.wordpress.org/aliakey7/) 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!

![](https://secure.gravatar.com/avatar/657f5be5484b4140b5c2a3e9566f73eb317a9e6f80ff0762a215986c287f7514?
s=60&d=retro&r=g)

### 󠀁[Great one](https://wordpress.org/support/topic/great-one-187/)󠁿

 [gerlofdelange](https://profiles.wordpress.org/gerlofdelange/) 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!!

 [ Læs alle 16 anmeldelser ](https://wordpress.org/support/plugin/disable-search/reviews/)

## Bidragsydere & udviklere

“Disable Search” er open source-software. Følgende personer har bidraget til dette
plugin.

Bidragsydere

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

“Disable Search” er blevet oversat til 7 sprog. Tak til [oversætterne](https://translate.wordpress.org/projects/wp-plugins/disable-search/contributors)
for deres bidrag.

[Oversæt “Disable Search” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/disable-search)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/disable-search/), tjek
[SVN repository](https://plugins.svn.wordpress.org/disable-search/), eller abonner
på [udviklerloggen](https://plugins.trac.wordpress.org/log/disable-search/) via 
[RSS](https://plugins.trac.wordpress.org/log/disable-search/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

#### 2.1.1 (2025-04-14)

 * Change: Discontinue unnecessary explicit loading of textdomain
 * Hardening: Ensure translated error message doesn’t contain markup
 * Change: Note compatibility through WP 6.8+
 * Change: Note compatibility through PHP 8.3+
 * Change: Update copyright date (2025)
 * Unit tests:
    - Change: Use `expectException()` instead of `@expectedException` comment (for
      PHPUnit 9 support)

#### 2.1 (2024-08-08)

 * Change: Remove the admin bar search field with a higher priority than what it
   was changed to in WP 6.6.
 * Change: Check if core/search block is registered before attempting to unregister.
   Props toru.
 * Change: Note compatibility through WP 6.6+
 * Change: Update copyright date (2024)
 * Change: Remove development and testing-related files from release packaging
 * Unit tests:
    - Hardening: Prevent direct web access to `bootstrap.php`
    - Fix: Define functions now expected by the bundled theme being used
 * New: Add some potential TODO items

#### 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

_Full changelog is available in [CHANGELOG.md](https://github.com/coffee2code/disable-search/blob/master/CHANGELOG.md)._

## Meta

 *  Version **2.1.1**
 *  Senest opdateret **1 år siden**
 *  Aktive installationer **40.000+**
 *  WordPress-version ** 4.6 eller højere **
 *  Testet op til **6.8.5**
 *  Sprog
 * [Chinese (Taiwan)](https://tw.wordpress.org/plugins/disable-search/), [Czech](https://cs.wordpress.org/plugins/disable-search/),
   [Dutch](https://nl.wordpress.org/plugins/disable-search/), [English (US)](https://wordpress.org/plugins/disable-search/),
   [German](https://de.wordpress.org/plugins/disable-search/), [Japanese](https://ja.wordpress.org/plugins/disable-search/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/disable-search/) og [Spanish (Spain)](https://es.wordpress.org/plugins/disable-search/).
 *  [Oversæt til dit sprog](https://translate.wordpress.org/projects/wp-plugins/disable-search)
 * Tags
 * [coffee2code](https://da.wordpress.org/plugins/tags/coffee2code/)[disable](https://da.wordpress.org/plugins/tags/disable/)
   [search](https://da.wordpress.org/plugins/tags/search/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/disable-search/advanced/)

## Bedømmelser

 4.7 ud af 5 stjerner.

 *  [  14 5-stjernet anmeldelser     ](https://wordpress.org/support/plugin/disable-search/reviews/?filter=5)
 *  [  1 4-stjernet anmeldelse     ](https://wordpress.org/support/plugin/disable-search/reviews/?filter=4)
 *  [  0 3-stjernet anmeldelser     ](https://wordpress.org/support/plugin/disable-search/reviews/?filter=3)
 *  [  0 2-stjernet anmeldelser     ](https://wordpress.org/support/plugin/disable-search/reviews/?filter=2)
 *  [  1 1-stjernet anmeldelse     ](https://wordpress.org/support/plugin/disable-search/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/disable-search/reviews/#new-post)

[Se alle anmeldelser.](https://wordpress.org/support/plugin/disable-search/reviews/)

## Bidragsydere

 *   [ Scott Reilly ](https://profiles.wordpress.org/coffee2code/)

## Support

Har du noget at sige? Har du brug for hjælp?

 [Vis supportforum](https://wordpress.org/support/plugin/disable-search/)

## Donér

Vil du gerne støtte udviklingen af dette plugin?

 [ Donér til dette plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6ARCFJ9TX3522)