How to use the sitemap feature
New in Tiki18: A built-in site map XML generator: https://sourceforge.net/p/tikiwiki/code/63719
Revamped in Tiki23 by replacing deprecated sitemap-php by melbahja/seo
In tiki, to generate the sitemap of your site, go to control panels / general preferences page / navigation tab. After activation, you can select 'sitemap' in the tools menu or visit: tiki-admin_sitemap.php
Clicking on 'rebuild sitemap' will generate two xml files (sitemap.xml, sitemap-index.xml).
The sitemap-index.xml file will look like this:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc> http://example.org/storage/public/sitemap.xml </loc> <lastmod>2017-09-26</lastmod> </sitemap> </sitemapindex>
You can now submit your sitemap-index.xml to Google. Submitting your new sitemap is free. You must go to https://search.google.com/search-console/about for sending your sitemap.The documentation explaining how to do it can be found here
Launch from the command line
In command line you need to have admin access to the CLI,then go to the root of your application. run :
# php console.php sitemap:generate http://wikisuite.org New sitemap created.
the submission and results will be the same as if you did it with the GUI
The result is here: http://wikisuite.org/storage/public/sitemap.xml
New in Tiki30: Generation Methods and Sitemap Splitting
Starting from Tiki 30, the sitemap feature was significantly revamped (see MR !9573) with two new preferences available under Control Panels / General Preferences / Navigation tab / Sitemap section.
Generation Method (sitemap_method)
The new Generation Method preference controls how sitemap XML files are produced and served.
| Value | Behaviour | ||
| Automatic (default) | Sitemap files are generated on the fly when a search engine (or any client) requests them via tiki-sitemap.php. This is the recommended default for most sites. | ||
| Manual | Sitemap files are pre-built and saved to disk (under storage/public/). Files must be regenerated explicitly by clicking Rebuild Sitemap in tiki-admin_sitemap.php, by running the console command, or by scheduling a scheduler task. | ||
When using Manual mode you can automate regeneration through the Scheduler or via the command line:
php console.php sitemap:generate https://example.org
Sitemap Splitting (sitemap_split)
For large sites, a single sitemap file per content type can grow very large. The new Sitemap Splitting preference lets you split sitemap files into smaller chunks based on publication date.
| Value | Behaviour | Example file names | |
| No split (default) | One sitemap file per content type, containing all entries. | sitemap-articles.xml, sitemap-pages.xml, sitemap-blogposts.xml | |
| Per Year | One sitemap file per content type per publication year. | sitemap-articles-2024.xml, sitemap-blogposts-2023.xml | |
| Per Year–Month (recommended for large sites) | One sitemap file per content type per year and month. | sitemap-articles-2024_03.xml, sitemap-blogposts-2023_11.xml | |
The sitemap index file (sitemap-index.xml) is updated automatically to reference all generated sub-sitemaps regardless of the split mode chosen.
Multilingual support
When Multilingual (Multilingual) is enabled on your site, sitemap entries for wiki pages and articles now include hreflang alternate-language links ( <xhtml:link rel="alternate"> ) pointing to each available translation. This helps search engines serve the correct language version to users in different locales.
Example output for a bilingual site:
<?xml version="1.0" encoding="UTF-8"?> <!-- Generated by https://git.io/phpseo --> <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml"> <url> <loc>https://example.org/HomePage</loc> <priority>1.0</priority> <changefreq>weekly</changefreq> <lastmod>2026-03-29T10:52:38+00:00</lastmod> <xhtml:link rel="alternate" href="https://example.org/Accueil" hreflang="fr"/> </url> </urlset>
Sitemap file URL format
The way sub-sitemap URLs appear inside the index file depends on whether SEF URL are active:
| SEF URLs enabled | SEF URLs disabled | ||
| /sitemap-articles.xml | /tiki-sitemap.php?file=sitemap-articles.xml | ||
Summary of new preferences (Tiki 30)
| Preference key | Type | Default | Description |
| sitemap_method | List (auto / manual) | auto | Controls whether sitemaps are generated on the fly (auto) or pre-built on demand (manual). |
| sitemap_split | List (none / year / year_month) | none | Controls whether sitemap files are split by year or by year and month. |
Related
- See Search engine optimization for existing documentation on all the current SEO facilities and the site map feature in particular.