When you upload a PDF to your site, you’ll usually want it to be found. Unfortunately, PDFs are handled a bit weird in WordPress sometimes. This very simple plugin, that has no settings whatsoever, ties into the Yoast SEO XML sitemaps. It creates an XML sitemap for all the PDFs ever uploaded to your site in one go. This specific XML sitemap is also added to your site’s index sitemap, so you can easily find it.
Frequently asked questions
The plugin only scans folders with numeric names, so it won’t add files that have been uploaded through forms.
Yes, the plugin scans the uploads folder once per day and saves that data to a transient. When you upload a new PDF file that cache is cleared automatically.
This plugin has not been tested on multisite.
Filters
The PDF XML sitemap plugin has the following filters:
Filter | Description |
---|---|
joost/pdf-sitemap/filetypes | Allows filtering which filetypes we’re adding to the XML sitemap. Just pdf by default. |
joost/pdf-sitemap/cache-time | Allows filtering how long the plugin caches the scanned PDFs for. Value needs to be in seconds. Defaults to one day. Note: setting to 0 will mean cache indefinitely, not disable it. |
joost/pdf-sitemap/pdfs | Allows filtering the PDFs being output. |
Get the plugin
Want to get the plugin? Search for pdf sitemap
in your WP admin or download the plugin from WordPress.org!
Download
Download the plugin on WordPress.org:
GitHub
Want to follow development, submit an issue or a patch? Come to the GitHub repo.
Security issues
Please report security issues through our Patchstack VDP.