Automatically add PDF files from your WordPress uploads directory to Yoast SEO's XML sitemap index, so search engines can discover and crawl them more easily.
This plugin is built for sites that publish PDFs such as whitepapers, menus, manuals, brochures, research papers, or downloadable resources and want those files surfaced more reliably in search.
- Makes PDFs easier to discover by adding them to a dedicated XML sitemap.
- Works with Yoast SEO and adds the PDF sitemap to
sitemap_index.xmlautomatically. - No setup required after activation.
- Optimized for performance with cached sitemap generation and automatic cache clearing when new PDFs are uploaded.
- Developer-friendly with filters for file types, cache duration, and sitemap entries.
After activation, the plugin:
- scans the WordPress uploads directory for supported files;
- generates a dedicated
pdf_files-sitemap.xmlsitemap; - adds that sitemap to Yoast SEO's sitemap index;
- refreshes cached data automatically when a new PDF is uploaded.
The plugin only works when Yoast SEO is active.
- Go to Plugins → Add New.
- Search for XML Sitemap for PDFs for Yoast SEO.
- Click Install Now and then Activate.
- Download the latest release from WordPress.org or this repository.
- Upload the plugin to
/wp-content/plugins/pdf-sitemap/. - Activate the plugin in Plugins.
There are no settings.
Once activated, visit your site's sitemap_index.xml and you should see a link to pdf_files-sitemap.xml.
- WordPress 6.7 or higher
- PHP 7.4 or higher
- Yoast SEO
Not always. The plugin scans WordPress-style numeric uploads folders, so PDFs stored outside that structure may not be included.
No. This plugin is built specifically for Yoast SEO.
Yes. The plugin scans the uploads folder once per day and stores the discovered files in a transient. When a new PDF is uploaded, that cache is cleared automatically.
Multisite support has not been officially tested yet.
The plugin includes a few filters for advanced use cases:
| Filter | Description |
|---|---|
JoostBlog\WP\pdf_sitemap\filetypes |
Filter which file extensions are included. Defaults to pdf. |
JoostBlog\WP\pdf_sitemap\cache_time |
Filter cache duration in seconds. Defaults to one day. |
JoostBlog\WP\pdf_sitemap\pdfs |
Filter the final list of files before output. |
- General support: WordPress.org support forum
- Bugs and enhancements: GitHub issues
- Security reports: Patchstack vulnerability disclosure program
- Fixed a bug that caused the cache not to be used.
- Fixed a bug that caused image dimensions to be missing.
- Fixed a potential notice for an unset variable.
- Renamed some filters for consistency.
- First release.
GPL-3.0-or-later. See LICENSE.


