PHPackages                             wdmg/yii2-sitemap - 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. wdmg/yii2-sitemap

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

wdmg/yii2-sitemap
=================

Sitemap manager

1.2.0(2y ago)04871MITPHP

Since Dec 22Pushed 2y ago1 watchersCompare

[ Source](https://github.com/wdmg/yii2-sitemap)[ Packagist](https://packagist.org/packages/wdmg/yii2-sitemap)[ Docs](https://github.com/wdmg/yii2-sitemap)[ RSS](/packages/wdmg-yii2-sitemap/feed)WikiDiscussions master Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (9)Used By (1)

[![Yii2](https://camo.githubusercontent.com/3f29058a9886ae3e9efc09df82d551051f8ea6c8da1176d9e8ca8a64be6f9b40/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f72657175697265642d596969325f76322e302e34302d626c75652e737667)](https://packagist.org/packages/yiisoft/yii2)[![Downloads](https://camo.githubusercontent.com/7e4b4b2d28702d392f1b3edd013e6deea7c7c6c82d722aa72ea47f17d428a80a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77646d672f796969322d736974656d61702e737667)](https://packagist.org/packages/wdmg/yii2-sitemap)[![Packagist Version](https://camo.githubusercontent.com/23853e5ac18a103361194ea3d7717907a89439d5eda0c5ab8d438c2d841a6aad/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77646d672f796969322d736974656d61702e737667)](https://packagist.org/packages/wdmg/yii2-sitemap)[![Progress](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)](https://camo.githubusercontent.com/d2c102b075c16f8a841e697b04c43bc93c8d092c5795ad8b3090d7fa993c258a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f70726f67726573732d72656164795f746f5f7573652d677265656e2e737667)[![GitHub license](https://camo.githubusercontent.com/d8e299c9ccc85786e7e575a319b4ca1669c5ab59c6b8e2d13f00387778f7dbc6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f77646d672f796969322d736974656d61702e737667)](https://github.com/wdmg/yii2-sitemap/blob/master/LICENSE)

[![Yii2 Sitemap](./docs/images/yii2-sitemap.png)](./docs/images/yii2-sitemap.png)

Yii2 Sitemap
============

[](#yii2-sitemap)

The module polls supported data models and displays links to their representations for front-ends and search engines.

You can expand or replace the list of supported models through the module configuration. In your model class, which you include in the site map module, you need to provide a selection by publication status (for example), as well data models must have the required public attribute `in_sitemap` and public method`getPublished()`which should return models with such required keys as: `url`,` updated_at`.

Autogenerated sitemap resolving at

Sitemap module monitors the saving, changing or deleting event for the supported models and clean the cache which the site map is formed, thus actualizing it. In addition, you can add/edit and delete the URL of sitemap in manual mode.

> Be careful when adding URLs manually for pages of dynamic content, since by deleting such a resource the link to it will still be on the site map.

This module is an integral part of the [Butterfly.СMS](https://butterflycms.com/) content management system, but can also be used as an standalone extension.

Copyrights (c) 2019-2023 [W.D.M.Group, Ukraine](https://wdmg.com.ua/)

Requirements
============

[](#requirements)

- PHP 5.6 or higher
- Yii2 v.2.0.40 and newest
- [Yii2 Base](https://github.com/wdmg/yii2-base) module (required)
- [Yii2 SelectInput](https://github.com/wdmg/yii2-selectinput) widget
- [Yii2 Options](https://github.com/wdmg/yii2-options) module (optionality)
- [Yii2 Pages](https://github.com/wdmg/yii2-pages) module (support)
- [Yii2 News](https://github.com/wdmg/yii2-news) module (support)
- [Yii2 Blog](https://github.com/wdmg/yii2-blog) module (support)

Installation
============

[](#installation)

To install the module, run the following command in the console:

`$ composer require "wdmg/yii2-sitemap"`

After configure db connection, run the following command in the console:

`$ php yii sitemap/init`

And select the operation you want to perform:

1. Apply all module migrations
2. Revert all module migrations
3. Flush sitemap cache

Migrations
==========

[](#migrations)

In any case, you can execute the migration and create the initial data, run the following command in the console:

`$ php yii migrate --migrationPath=@vendor/wdmg/yii2-sitemap/migrations`

Configure
=========

[](#configure)

To add a module to the project, add the following data in your configuration file:

```
'modules' => [
    ...
    'sitemap' => [
        'class' => 'wdmg\sitemap\Module',
        'routePrefix' => 'admin',
        'supportModels'  => [  // list of supported models for displaying a sitemap
            'pages' => 'wdmg\pages\models\Pages',
            'news' => 'wdmg\news\models\News',
        ],
        'cacheExpire' => 43200, // sitemap cache lifetime, `0` - for not use cache
        'defaultFrequency' => 'weekly', // default update frequency
        'defaultPriority' => 0.5, // default update priority
        'sitemapRoute' => '/' // default route to rendered sitemap.xml (use "/" - for root)
    ],
    ...
],

```

Routing
=======

[](#routing)

Use the `Module::dashboardNavItems()` method of the module to generate a navigation items list for NavBar, like this:

```

```

Status and version \[ready to use\]
===================================

[](#status-and-version-ready-to-use)

- v.1.2.0 - Update copyrights, fix nav menu
- v.1.1.4 - Update dependencies, README.md
- v.1.1.3 - Update README.md and dependencies

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity62

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

Every ~183 days

Recently: every ~297 days

Total

8

Last Release

1049d ago

Major Versions

0.0.1 → 1.0.02020-01-05

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1635637?v=4)[Alexsander Vyshnyvetskyy](/maintainers/alex-wdmg)[@alex-wdmg](https://github.com/alex-wdmg)

---

Top Contributors

[![alex-wdmg](https://avatars.githubusercontent.com/u/1635637?v=4)](https://github.com/alex-wdmg "alex-wdmg (19 commits)")

---

Tags

manageryii2Sitemapwdmgyii2-sitemap

### Embed Badge

![Health badge](/badges/wdmg-yii2-sitemap/health.svg)

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

###  Alternatives

[mrssoft/yii2-sitemap

Yii2 sitemap extension

1123.9k1](/packages/mrssoft-yii2-sitemap)

PHPackages © 2026

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