PHPackages                             yurcrm/sitemap-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yurcrm/sitemap-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yurcrm/sitemap-generator
========================

XML sitemaps generation

v2.0.0(2y ago)0922MITPHPPHP ^7.4 || ^8.0

Since Nov 29Pushed 2y agoCompare

[ Source](https://github.com/Sunsetboy/sitemaps-generator)[ Packagist](https://packagist.org/packages/yurcrm/sitemap-generator)[ RSS](/packages/yurcrm-sitemap-generator/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (1)Versions (6)Used By (0)

XML sitemap generator
=====================

[](#xml-sitemap-generator)

XML sitemap files generator for unlimited sets of links

[![](https://camo.githubusercontent.com/a3998002cfd23586a72ca7ba0fd54e8c8eaf496da56c4ac0d2dc9fe91e4c652b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)](https://camo.githubusercontent.com/a3998002cfd23586a72ca7ba0fd54e8c8eaf496da56c4ac0d2dc9fe91e4c652b/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f53756e736574626f792f736974656d6170732d67656e657261746f722e737667) [![](https://camo.githubusercontent.com/bc828a4feeeff283de21e2ea53f4ae415ca1ca3cd292a7c3e752a1a077f1879b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)](https://camo.githubusercontent.com/bc828a4feeeff283de21e2ea53f4ae415ca1ca3cd292a7c3e752a1a077f1879b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)[![](https://camo.githubusercontent.com/47d59afead69292919c15eb462f742cdc82ad094e77ff3cd80366525a2a75c56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)](https://camo.githubusercontent.com/47d59afead69292919c15eb462f742cdc82ad094e77ff3cd80366525a2a75c56/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)[![](https://camo.githubusercontent.com/c071dfe13e14ae6cba47e04abd0a47b72c5d54c7d22c9aac077f8ddced2f45c3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)](https://camo.githubusercontent.com/c071dfe13e14ae6cba47e04abd0a47b72c5d54c7d22c9aac077f8ddced2f45c3/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6d61696e7461696e6162696c6974792f53756e736574626f792f736974656d6170732d67656e657261746f722e737667)

### What is a XML sitemap?

[](#what-is-a-xml-sitemap)

XML sitemap is a text file with links to pages of a website. Search engines like Google or Yandex use sitemap files to discover web pages. You can help your website to be crawled more quickly by adding a sitemap file to it's root directory.

By standard each sitemap file can contain up to 50 000 links. What if you have a large website with thousands of pages? Just create few sitemaps and link them together!

This package helps you to create sitemap files for any number of pages on your website.

### How it works?

[](#how-it-works)

My solution takes any number of links provided by you and packs them into XML files up to 50000 links and 10 MB each (sitemap\_1.xml, sitemap\_2.xml, etc). These limitations are configurable. It also creates an index sitemap file sitemap.xml.

After generation of sitemap files you can add index sitemap to the search engine using tools like Google Webmaster. You can also add to your robots.txt file:

```
Sitemap: https://yoursite.com/sitemap.xml

```

### Requirements

[](#requirements)

PHP 7.4+ with mb\_string extension

### Installation

[](#installation)

You can install this package using Composer.

```
composer require yurcrm/sitemap-generator

```

### Usage example

[](#usage-example)

```
$sitemapGenerator = new SitemapGenerator();
// your website URL
$siteUrl = 'https://example.com';

/*
*   You should generate this array of links according to your website content
*/
$links = [
    new SitemapUrl(
        'https://www.100yuristov.com/123',
        '2018-12-07',
        'weekly',
        0.5,
    ),
    new SitemapUrl(
        'https://www.100yuristov.com/123456',
        '2018-12-07',
        'weekly',
        0.5,
    ),
];

$sitemapGenerator->setSiteUrl($siteUrl)
->setLinks($links)
->setFileSizeLimit(5*1024*1024)
->setLinksPerFileLimit(30_000)
->createSitemaps();

// save files to the folder (use absolute path)
$sitemapGenerator->saveAsFiles('/var/www/site');

```

### Usage with generator

[](#usage-with-generator)

Use this approach for big sitemaps to limit memory usage

```
// $linksGenerator - PHP generator which returns SitemapUrl objects

$sitemapsCount = $sitemapGenerator->setSiteUrl('https://www.100yuristov.com')
    ->setFileSizeLimit(5*1024*1024)
    ->setLinksPerFileLimit(30_000)
    ->createFilesFromLinksGenerator($linksGenerator, self::TMP_SITEMAPS_FOLDER);

```

### Any questions?

[](#any-questions)

Feel free to ask me about my solution or report a bug by sending me an email:

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 97.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~173 days

Total

4

Last Release

739d ago

Major Versions

v1.2.1 → v2.0.02024-05-03

PHP version history (2 changes)v1.1.0PHP ^7.3 || ^8.0

v1.2.0PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe40691354fc8874fcf7f3b4a12cc63f320073d928636f0a2b4828e8dbc12151?d=identicon)[100yuristov](/maintainers/100yuristov)

---

Top Contributors

[![Sunsetboy](https://avatars.githubusercontent.com/u/25583746?v=4)](https://github.com/Sunsetboy "Sunsetboy (35 commits)")[![Vitmann](https://avatars.githubusercontent.com/u/45695293?v=4)](https://github.com/Vitmann "Vitmann (1 commits)")

---

Tags

phpsitemap-generatorsitemap-xml-files

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yurcrm-sitemap-generator/health.svg)

```
[![Health](https://phpackages.com/badges/yurcrm-sitemap-generator/health.svg)](https://phpackages.com/packages/yurcrm-sitemap-generator)
```

###  Alternatives

[overtrue/laravel-stateless-session

A lightweight middleware to make api routing session capable.

186.1k](/packages/overtrue-laravel-stateless-session)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
