• Verified
  • Free plan

php-sitemap

Listed under GitHub repos

php-sitemap is an open source PHP package that generates sitemaps in XML, TXT, HTML and Google News formats and works with Laravel, Symfony or any PHP project. It is free.

Used for

  • XML sitemap generation
  • Google News sitemaps
  • image and video sitemaps

What php-sitemap does

php-sitemap is a framework-agnostic PHP package that builds sitemaps and renders them as XML, TXT, HTML or Google News. It requires PHP 8.3 or newer and installs through Composer as rumenx/php-sitemap. The repository ships controller examples for Laravel and Symfony plus a plain PHP example, so the same builder can run inside a framework or in a standalone script.

Entries are added through add() or addItem() and can carry images, videos, translations and alternate links. Configuration is type-safe and fluent, so methods chain, and a strict mode validates every field before rendering. The package is MIT licensed and shares its API design with the sibling npm-sitemap and go-sitemap libraries, which lets polyglot teams keep one sitemap model across languages.

Key features

XML, TXT, HTML, News output
One builder renders the same sitemap as XML, plain TXT, an HTML page or a Google News feed.
Laravel and Symfony controllers
Repository includes controller method examples for Laravel and Symfony plus a generic PHP autoload script.
add() and addItem() entry methods
Two documented ways to attach URLs, one for full field sets, one for simpler entries.
Fluent, type-safe configuration
Sitemap settings are set through chained methods and typed configuration objects rather than loose arrays.
Strict mode input validation
Enable strict mode to validate every entry field automatically before the sitemap is rendered.
Image and video sitemap fields
Entries accept image and video fields alongside the URL, so media is carried in the generated sitemap.
Translations and alternate links
Add translated URLs and alternate links for the same page across languages within a single sitemap.
Shared API with npm and Go
npm-sitemap and go-sitemap use the same API design, so the sitemap model ports between languages.
Composer install, PHP 8.3+
Install with composer require rumenx/php-sitemap on PHP 8.3 or newer, with no framework required.

How it works

  1. Install the package through Composer, which requires PHP 8.3 or newer.
  2. Create a Sitemap instance inside a Laravel, Symfony or plain PHP script.
  3. Add URLs with add() or addItem(), including optional images, videos, translations and alternates.
  4. Optionally enable strict mode so each entry is validated before rendering.
  5. Render the output as XML, TXT, HTML or Google News and serve or store the file.

Plans and pricing

The package is free under the MIT licence and installed with Composer; the material prints no paid tier.

Integrations and platforms

Works with

  • Laravel
  • Symfony
  • Composer

Available as

  • Web

Repository facts

  • RepositoryRumenDamyanov/php-sitemap
  • LanguagePHP
  • Stars1342
  • Forks274
  • LicenceMIT
  • Created2013-05-30
  • Last commit2026-10-27
  • Open issues1
  • laravel
  • php
  • sitemap-generator
  • sitemap-xml
  • sitemapindex
  • symfony

Services and details

  • Does SEO work itself

    Yes
  • Free plan or free tools

    Yes
  • API or MCP server

    Yes

No information yet on keyword research, content optimization, writes content with AI, technical audits, rank tracking, backlinks and link building, local SEO, AI search visibility, free trial, WordPress plugin, browser extension, built for agencies. The website did not say; check with the vendor.

Compare with other SEO tools:

About the company

Listing compiled from public sources and the product's own website. Last updated 2026-11-12. Report a correction or request removal. Back to GitHub repos.