viraxpress/sitemap-splitter

ViraXpress Sitemap Splitter

Maintainers

Package info

github.com/viraxpress/SitemapSplitter

Type:magento2-module

pkg:composer/viraxpress/sitemap-splitter

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.0 2026-04-10 11:16 UTC

This package is auto-updated.

Last update: 2026-06-10 11:16:39 UTC


README

Description

ViraXpress_SitemapSplitter enhances the default Magento sitemap by splitting it into separate files per content type — categories, CMS pages, and products. It generates a sitemap index file referencing all individual sitemaps, improving crawl efficiency and compliance with search engine size limits.

This approach improves search engine crawling efficiency, reduces memory usage during sitemap generation, and ensures compliance with sitemap size limits imposed by search engines like Google.

Features

  • Generates separate sitemap files for categories, CMS pages, and products
  • Automatically splits product sitemaps into multiple files based on a configurable URL limit (default: 40,000)
  • Optionally includes product images in Google image sitemap format
  • Exclude specific category URLs from the sitemap
  • Exclude specific CMS page URLs from the sitemap
  • Exclude out-of-stock product URLs from the sitemap
  • Select which entities (Products, Categories, CMS Pages) to include per sitemap record
  • Multi-store support — generates sitemaps independently per store view
  • CLI command for manual generation: bin/magento viraxpress:sitemap:generate
  • Comprehensive logging for monitoring and troubleshooting

Compatibility

  • Magento 2.4.x

Installation

  1. Install the extension via Composer:

    composer require viraxpress/sitemap-splitter
  2. Run the following commands from your Magento root directory:

    php bin/magento module:enable ViraXpress_SitemapSplitter
    php bin/magento setup:upgrade
    php bin/magento setup:di:compile
    php bin/magento setup:static-content:deploy
    php bin/magento cache:flush

Step 3: Configuration

Navigate to Stores > Configuration > Catalog > XML Sitemap.

Categories Options

  • Frequency / Priority: Standard sitemap settings for category URLs
  • Exclude Category URLs: Select specific categories to exclude from the sitemap

Products Options

  • Frequency / Priority: Standard sitemap settings for product URLs
  • Add Images into Sitemap: Include product images in Google image sitemap format
  • Exclude Out of Stock product URLs: Set to Yes to exclude out-of-stock products

CMS Pages Options

  • Frequency / Priority: Standard sitemap settings for CMS page URLs
  • Exclude CMS Pages URLs: Select specific CMS pages to exclude from the sitemap

ViraXpress Sitemap Splitter

  • Enable Sitemap Splitter: Set to Yes to activate split sitemap generation
  • Product URLs Per Sitemap: Maximum product URLs per file (default: 40000)
  • Include Product Images: Include product images in sitemap
  • Sitemap Path: Path relative to Magento root where sitemaps are stored (default: pub/media/sitemap)

Step 4: Generate Sitemaps

Manual Generation via CLI

php bin/magento viraxpress:sitemap:generate [--store=STORE_ID]

Replace STORE_ID with the specific store ID if you want to generate sitemaps for a particular store. Omit this option to generate sitemaps for all stores.

Step 5: Verify Installation

  1. Check that the sitemap index file is generated at the configured path (e.g., pub/media/sitemap/sitemap.xml).
  2. Submit the sitemap index URL to search engines (Google Search Console, Bing Webmaster Tools, etc.).

Configuration Options

Option Description Default Value
Enable Sitemap Splitter Enables/disables the extension No
Product URLs Per Sitemap Maximum product URLs per file 40000
Include Product Images Include product images in sitemap No
Sitemap Path Path for sitemap files pub/media/sitemap

File Structure

After generation, the following files are created:

  • sitemap.xml - Sitemap index file
  • sitemap-categories.xml - Category URLs
  • sitemap-pages.xml - CMS page URLs
  • sitemap-products-1.xml, sitemap-products-2.xml, etc. - Product URLs (split as needed)
  • sitemap-blog.xml - Blog post URLs (if enabled)

Troubleshooting

  • Sitemaps not generating: Check that the extension is enabled in configuration and that the sitemap path is writable.
  • Memory issues: Reduce the product limit per sitemap or increase PHP memory limits.
  • Missing sitemaps: Ensure that the required Magento modules (Sitemap, Catalog, CMS) are enabled.

Support

For support, please contact ViraXpress at https://www.viraxpress.com or refer to the license agreement.

License

This extension is licensed under the ViraXpress license agreement. See https://www.viraxpress.com/license for details.