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 2w ago

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 41% 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

2772d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12739106?v=4)[Alex](/maintainers/alexecus)[@alexecus](https://github.com/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

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19664.8M1.6k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M196](/packages/sulu-sulu)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

53675.5k16](/packages/solspace-craft-freeform)[api-platform/openapi

Models to build and serialize an OpenAPI specification.

374.2M77](/packages/api-platform-openapi)[symfony/asset-mapper

Maps directories of assets &amp; makes them available in a public directory with versioned filenames.

1668.1M217](/packages/symfony-asset-mapper)

PHPackages © 2026

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