How to make PDFs searchable on WordPress
By Hook & Plug · Published October 19, 2026
If your site publishes handbooks, agreements, policies, price lists or minutes as PDFs, your visitors cannot find what is in them. WordPress search looks at the title, the caption and the description of an uploaded file, and nothing else. The words inside the PDF might as well not exist.
This guide covers why, the four ways to fix it, and how to choose. It is written by the makers of AskMyPages, which is one of the four options, so read the others first.
Why WordPress search ignores PDFs
An uploaded PDF is a media attachment. WordPress stores its title, its alt text, its caption and its description in the database, and the file itself on disk. The built-in search queries the database with a simple text match on titles and content. It never opens the file.
Most themes also exclude attachments from search results altogether, and since WordPress 6.4 the attachment pages that used to exist for every upload are turned off by default. So even a PDF whose title matches the query usually does not appear.
The result: a member searches your site for "bereavement leave", the clause is on page 41 of the collective agreement, and the search says nothing matched.
Option 1: put the text on a page
The zero-cost fix. Open the PDF, copy the text, paste it into a WordPress page, and keep the PDF as a download link at the top. Built-in search now finds the words, and so does Google.
- Works well for short, stable documents: a policy, a fee schedule, a set of rules.
- Breaks down past twenty pages or so. Tables lose their layout, and every new version of the document means pasting again.
- The visitor still gets a whole page back, not the paragraph they asked about.
Option 2: a keyword search plugin that indexes PDF text
The established WordPress search plugins can read the text of PDFs in your Media Library and include them in results. SearchWP does this in its paid version, and Relevanssi in its Premium version, which sends the file to their service to extract the text.
- Keyword matching only: the visitor has to use the words the document uses. "Time off when a parent dies" will not find "bereavement leave".
- The result is the PDF as a whole, usually without a page number.
- Good fit when your visitors know the vocabulary and you also want custom fields, product attributes or other post types searched.
Option 3: let Google do it
Google indexes public PDFs. A Programmable Search Engine box on your site returns results from Google's index of your domain, PDFs included, and links straight into the file.
- Free, with ads in the results. Results depend on what Google has crawled and when; a new document can take days or weeks to show up.
- Nothing behind a login is ever found, which is right for Google and wrong for a members' site.
- The box and results page look like Google, not like your site.
Option 4: a search that reads the PDF and answers the question
The newer approach indexes the text of each page of each PDF by meaning, so a question in plain words finds the passage that answers it even when the words differ. Then it answers the question directly and cites the page.
This is what AskMyPages does. It keeps your theme's search box and results page, ranks results by meaning as well as words, and puts a card above the results with a direct answer and a numbered link to the page or the PDF page it came from. The same engine powers an optional chat button.
- Text PDFs only, up to the plan's page and storage caps (the Free plan covers 150 pages and 50 MB; Starter 2,500 pages and 500 MB).
- PDFs marked members-only are answered for logged-in members with the right role and never shown to the public.
- Answers come only from your content; when the documents do not cover it, it says so.
Scanned PDFs need one extra step
A scanned document is a picture of text. No search of any kind can read it until it has been through OCR (optical character recognition). Check by opening the PDF and trying to select a word: if you cannot, it is a scan.
- Run OCR once. Adobe Acrobat has "Recognize text"; the free command-line tool ocrmypdf does the same and keeps the original look.
- Upload the OCR'd version in place of the scan (the Enable Media Replace plugin keeps the same URL, so existing links still work).
- Re-index, or wait for the next sync.
Making PDFs searchable with AskMyPages, step by step
- Install AskMyPages from the Plugins screen and click Connect; you sign in with your email and are sent back.
- On the Content tab, PDFs are ticked by default. Untick categories or single files you do not want searched.
- Wait for the first sync (a few minutes for a typical site). The Content tab shows what is searchable and lists any PDF skipped for being over the caps or a scan.
- On the Search tab, ask a question a visitor would ask and check that the answer card cites the right page.
- For documents only members should see, open the Access tab and mark them members-only, or mark a whole category.
The Free plan needs no card. Try it on the live demo, a real WordPress site with a 60-page agreement, before installing.
Questions people ask
- Does WordPress search PDF contents by default?
- No. It searches the title, caption and description stored for the upload, and most themes do not show attachments in results at all.
- Can PDFs behind a member login be searched?
- With a keyword plugin, only if the results page itself is behind the login. AskMyPages marks documents members-only and answers from them only for logged-in members with an allowed role.
- Does this work with page builders like Elementor or Divi?
- Yes. The PDFs live in the Media Library, not in the builder, so the builder does not matter. The search box upgrade works with any theme that uses the standard WordPress search form.
- How big a PDF can be searched?
- Keyword plugins have no fixed limit beyond server memory. AskMyPages caps pages and storage by plan, from 150 pages on Free to 200,000 on Agency.