PHPackages                             alexecus/sitemaper - 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. alexecus/sitemaper

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

alexecus/sitemaper
==================

Sitemaper is a library to generate flexible sitemaps

1.0(7y ago)038MITPHP

Since Nov 26Pushed 7y ago1 watchersCompare

[ Source](https://github.com/alexecus/sitemaper)[ Packagist](https://packagist.org/packages/alexecus/sitemaper)[ RSS](/packages/alexecus-sitemaper/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

[![](assets/banner.png)](assets/banner.png)

[![Maintainability](https://camo.githubusercontent.com/95863ffdae41bd2bb356be593f4afa67dd83f7ceaed65ab08459cfd31c6a64a5/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38316633666463346437323162336633396233622f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/alexecus/sitemaper/maintainability)[![Test Coverage](https://camo.githubusercontent.com/a5f1a94f23ff052abefe104b682c0799e67d149db57278aef50559d236aca442/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f38316633666463346437323162336633396233622f746573745f636f766572616765)](https://codeclimate.com/github/alexecus/sitemaper/test_coverage)

**Sitemaper** is a very flexible PHP sitemap generator library that you can use to generate sitemap files. It can generate into various format such as XML. It can also output the sitemap as raw data so you can bind it to a controller for example.

**View complete documentation on the [official website](https://alexecus.com/project/sitemaper)**

```
use Alexecus\Sitemaper\Sitemap;

$sitemap = new Sitemap('http://mysite.com');

$sitemap
    ->addItem('/', [
        'lastmod' => '2020-05-15',
        'changefreq' => 'monthly',
        'priority' => '1.0',
    ])
    ->addItem('/page', [
        'lastmod' => '2020-05-15',
        'changefreq' => 'daily',
        'priority' => '0.8',
    ]);

$sitemap->write('sitemap.xml');
```

### Installation

[](#installation)

Install via Composer

```
$ composer require alexecus/sitemaper
```

### What can Sitemaper do

[](#what-can-sitemaper-do)

- Generate XML files
- Output sitemap XML response from your controller
- Generate sitemap index files

### Why choose Sitemaper

[](#why-choose-sitemaper)

- Probably the most flexible, you can even change the transformers and writers
- Support for Google sitemap extensions
- Support for sitemap index files
- 100% test code coverage
- Fluent usage
- Fully documented

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2724d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fe869db6ab4a723014aa3db1828d70c32d886f029a5173581ed931fb603150a4?d=identicon)[alexecus](/maintainers/alexecus)

---

Top Contributors

[![alexecus](https://avatars.githubusercontent.com/u/12739106?v=4)](https://github.com/alexecus "alexecus (19 commits)")

---

Tags

phpsitemapsitemap-generatorsitemap-phpsitemap-xml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/alexecus-sitemaper/health.svg)

```
[![Health](https://phpackages.com/badges/alexecus-sitemaper/health.svg)](https://phpackages.com/packages/alexecus-sitemaper)
```

###  Alternatives

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

52664.9k12](/packages/solspace-craft-freeform)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[shyim/danger-php

Port of danger to PHP

8544.9k](/packages/shyim-danger-php)[mapbender/mapbender

Mapbender library

10117.4k5](/packages/mapbender-mapbender)[spomky-labs/pwa-bundle

Progressive Web App Manifest Generator Bundle for Symfony.

6144.4k1](/packages/spomky-labs-pwa-bundle)

PHPackages © 2026

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