viraxpress/sitemap-splitter 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

viraxpress/sitemap-splitter

最新稳定版本:1.0.0

Composer 安装命令:

composer require viraxpress/sitemap-splitter

包简介

ViraXpress Sitemap Splitter

README 文档

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.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-06-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固