Skip to content
XML sitemap files generator for unlimited sets of links
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

XML sitemap generator

XML sitemap files generator for unlimited sets of links

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?

My solution takes any number of links provided by you and packs them into XML files up to 50000 links each (sitemap_1.xml, sitemap_2.xml, etc). 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:



PHP 5.4+


You can install this package using Composer.

composer require yurcrm/sitemap-generator

Usage example

$sitemapGenerator = new SitemapGenerator();
// your website URL
$siteUrl = '';

*   You should generate this array of links according to your website content
$links = [
        'link' => '',
        'date' => '2018-12-07',
        'frequency' => 'weekly',
        'priority' => 0.5,
        'link' => '',
        'date' => '2018-12-07',
        'frequency' => 'weekly',
        'priority' => 0.5,


// save files to the folder (use absolute path) 

Any questions?

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

You can’t perform that action at this time.