Dynamic XML sitemap generator for WordPress with automatic pagination, IndexNow support (Bing/Yandex), Google Rich Results for WooCommerce, and Google notification. Optimized for WooCommerce stores with tens of thousands of products.
- Automatic pagination — Splits sitemaps into files of 10,000 URLs (configurable). 40,000 products = 4 sitemap files, automatically
- Optimized database queries — Direct SQL with
LIMIT/OFFSET, never loads 40,000+ WP_Post objects into memory - Google Rich Results — Enhances WooCommerce product schema with shipping, return policy, reviews, and seller data for better search visibility
- IndexNow queued mode — URLs queued and sent in batches via WP-Cron, never blocks WooCommerce stock sync loops
- Stock update filtering — Ignores changes that only affect stock quantity/status (compares title, content, price, SKU)
- Google notification — Automatic
robots.txtsitemap declaration + optional ping - Bing/Yandex notification — Instant via IndexNow protocol with configurable batch scheduling
- Full admin dashboard — Statistics, queue management, Rich Results self-test, activity log, one-click actions
The Rich Results module adds structured data (JSON-LD) to WooCommerce products for improved Google search appearance:
| Schema Field | Type | Description |
|---|---|---|
shippingDetails |
OfferShippingDetails |
Shipping cost (read from WooCommerce zones), destination country, handling + transit times |
hasMerchantReturnPolicy |
MerchantReturnPolicy |
Return days, return fees, return shipping cost, policy URL |
aggregateRating |
AggregateRating |
Average rating and review count |
review |
Review[] |
Individual reviews with author, rating, date, body |
seller |
Organization |
Merchant name and URL inside offers |
| Product name | Truncation | Truncates names exceeding max length (default 150 chars) |
Go to Settings > Open Sitemap > Opzioni Rich Results and configure:
- Merchant name and URL
- Shipping country (ISO 3166-1 alpha-2)
- Handling and transit times
- Return policy (days, URL, fees type, shipping fees amount)
- Reviews (enable/disable, max per product)
- Product name max length
Click "Esegui Test Rich Results" in the admin dashboard to validate schema generation on a real product. The test checks:
- WooCommerce active
- Merchant configured
- Return policy URL
- Schema generation on a real product
- All required fields:
shippingRate,shippingDestination,deliveryTime,returnPolicy,returnShippingFeesAmount,aggregateRating/review,sellerin offers
With 40,000 products and 10,000 URLs/file limit:
sitemap.xml (index)
├── sitemap-pages-1.xml (pages)
├── sitemap-products-1.xml (products 1-10,000)
├── sitemap-products-2.xml (products 10,001-20,000)
├── sitemap-products-3.xml (products 20,001-30,000)
├── sitemap-products-4.xml (products 30,001-40,000)
└── sitemap-categories-1.xml (categories)
| Engine | Method | Status |
|---|---|---|
robots.txt + Search Console + Rich Results |
Automatic | |
| Bing | IndexNow (queued batch) | Instant |
| Yandex | IndexNow (shared from Bing) | Instant |
Note: Google does NOT support IndexNow. The primary method for Google is
robots.txt+ manual Search Console registration. Rich Results improve product visibility in search.
- WordPress 5.0+
- PHP 7.4+
- WooCommerce (optional, required for product support and Rich Results)
- Download the latest release ZIP
- In WordPress admin: Plugins > Add New > Upload Plugin
- Upload the ZIP file and activate
- Go to Settings > Permalinks and click Save (activates rewrite rules)
- Go to Settings > Open Sitemap and configure
- Clone or download this repository
- Copy the
open-sitemap-generatorfolder to/wp-content/plugins/ - Activate in WordPress admin
- Save Permalinks and configure
| Setting | Value | Why |
|---|---|---|
| Queue mode | Hourly | Batches stock sync updates |
| Exclude stock-only updates | Enabled | Prevents quota waste during bulk imports |
| Max URLs per sitemap | 10,000 | Good balance of performance and size |
| Batch size | 100 | Safe for most hosting |
| Ping Google on change | Enabled | Deprecated but harmless |
| Rich Results | Enabled | Better product visibility in Google |
| Merchant name | Your store name | Required for seller schema |
| Return days | 14 | EU standard |
WordPress uses a pseudo-cron triggered by site visits. For guaranteed timing:
-
Add to
wp-config.php:define('DISABLE_WP_CRON', true);
-
Add system cron (cPanel/Plesk):
*/15 * * * * wget -q -O - https://yoursite.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
For sites with regular traffic, the default WP-Cron is sufficient.
open-sitemap-generator/
├── open-sitemap-generator.php # Main plugin file (v1.4.0)
├── includes/
│ ├── class-indexnow.php # IndexNow queue system
│ └── class-rich-results.php # Google Rich Results schema enhancement
├── admin/
│ ├── settings-page.php # Admin dashboard
│ ├── style.css # Admin styles
│ └── script.js # Admin AJAX handlers
├── CHANGELOG.md # Full version history
├── README.md # This file
├── LICENSE # GPL v2
└── readme.txt # WordPress.org format
osg_notify_google— Fires when Google ping is scheduledosg_indexnow_process_queue— Fires when IndexNow queue is processed
robots_txt— Adds sitemap URL to robots.txtwoocommerce_structured_data_product— Rich Results module enhances product JSON-LD (priority 99)
- Fork the repository
- Create a feature branch:
git checkout -b feature/my-feature - Commit changes:
git commit -m 'Add my feature' - Push:
git push origin feature/my-feature - Open a Pull Request
Please see CHANGELOG.md for the development roadmap and known limitations.
This project is licensed under the GPL v2 or later — see LICENSE for details.
Developed by quakef4.