Title: Admin Search Pages Function Doesn&#8217;t Work
Last modified: March 18, 2024

---

# Admin Search Pages Function Doesn’t Work

 *  Resolved [markrr](https://wordpress.org/support/users/markrr/)
 * (@markrr)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/)
 * When editing a (self-hosted) site, and I’m on the “Pages” tab, no matter what
   page name or partial page name I search for in the “Search Pages” section in 
   the upper right corner, I get miscellaneous results back not at all related to
   my search term.
 * What exactly does WP search/look at? The page title? Page contents? Or has it
   been broke for years?

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17509975)
 * The search works for me without any problems. It searches in the page title and
   also in the content.
 * Do you have any plugins active? Deactivate them all as a test and check whether
   the behaviour changes. If not, change the theme to a standard theme.
 *  Thread Starter [markrr](https://wordpress.org/support/users/markrr/)
 * (@markrr)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17510030)
 * Thanks. That didn’t change results unfortunately.
 * Does it check the public-facing content or the actual source code?
 * e.g. If I have a URL in the navigation that contains the search term (only exists
   in the source code), would that page show in the page search results? If so, 
   any way to limit it to just search page titles?
    -  This reply was modified 2 years, 2 months ago by [markrr](https://wordpress.org/support/users/markrr/).
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17510031)
 * Strange. Which WordPress version are you using? Are there any anomalies under
   Tools > Site Health?
 * And as a test: create a page with the title “example” and then search for “example”–
   there should be a result?
 *  Thread Starter [markrr](https://wordpress.org/support/users/markrr/)
 * (@markrr)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17510057)
 * See my earlier question about what it actually searches please.
 * I created a unique page name, didn’t add it to the navigation and it only returned
   that page as it should.
 * But it appears it is actually searching the source code. If I search for a term
   that doesn’t appear on the visible page, but appears in the source code (e.g.
   part of a URL in a link) it returns that page. Just wish I knew what it actually
   searches, and I could control that.
    -  This reply was modified 2 years, 2 months ago by [markrr](https://wordpress.org/support/users/markrr/).
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17510074)
 * Sorry, but when I take a loop at questions in this forum, I certainly don’t look
   at previous topics of the questioner. If I did, I wouldn’t get round to answering.
 * As I wrote above, WordPress searches in the title and content of the pages, as
   well as in the excerpt. As long as you don’t set any other filters, all posts
   will be searched regardless of their status. Taxonomies are not taken into account.
 * See also: [https://wordpress.stackexchange.com/questions/189494/what-exactly-does-the-s-parameter-search-for-in-wp-queries](https://wordpress.stackexchange.com/questions/189494/what-exactly-does-the-s-parameter-search-for-in-wp-queries)
 * If you are interested in the SQL query, you can display it with this plugin, 
   for example: [https://wordpress.org/plugins/query-monitor/](https://wordpress.org/plugins/query-monitor/)–
   after activation, go to the Pages page, run the search and then click on “Database
   Queries” at the top and search for your search term in the list. You will then
   have found the query. In my case (without any plugins and with standard theme)
   it looks like this:
 *     ```wp-block-code
       SELECT wp_posts.ID, wp_posts.post_parentFROM wp_postsWHERE 1=1AND (((wp_posts.post_title LIKE '%classic%')OR (wp_posts.post_excerpt LIKE '%classic%')OR (wp_posts.post_content LIKE '%classic%')))AND ((wp_posts.post_type = 'page'AND (wp_posts.post_status = 'publish'OR wp_posts.post_status = 'future'OR wp_posts.post_status = 'draft'OR wp_posts.post_status = 'pending'OR wp_posts.post_status = 'private')))ORDER BY wp_posts.menu_order ASC, wp_posts.post_title ASC
       ```
   
 *  Thread Starter [markrr](https://wordpress.org/support/users/markrr/)
 * (@markrr)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17510234)
 * Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Admin Search Pages Function Doesn’t Work’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [markrr](https://wordpress.org/support/users/markrr/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/admin-search-pages-function-doesnt-work/#post-17510234)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
