Manual:GenerateSitemap.php

generateSitemap.php is used to generate a sitemap for a MediaWiki installation. Sitemaps are files that make it more efficient for search engine robots (like googlebot) to crawl a website (so long as the bot supports the sitemap protocol.)

By default, the script generates a sitemap index file and one gzip-compressed sitemap for each namespace that has content. See for a list of options that can be passed to the script.

Attention: In MediaWiki 1.16.0 the sitemap generated by the script does not work with Google. You need to patch the script with this first.

For generic instructions on using MediaWiki's maintenance scripts, see Manual:Maintenance_scripts.

Options
 
 * displays the available options for generateSitemap.php

 
 * The file system path to save to, e.g /tmp/sitemap/

 
 * The URL prefix corresponding to --fspath, e.g.
 * http://wiki.example.com/sitemap/
 * If specified, gets prefixed to filenames in the sitemap index. This is needed because some search engines *cough*Google*cough* require absolute URLs in sitemaps.  You should specify --server also; the values will often be similar, but having them separate allows the script to accommodate even unusual setups.
 * Only available in latest SVN HEAD versions (r77176 and later).

 
 * The protocol and host name to use in URLs, e.g.
 * http://en.wikipedia.org
 * This is sometimes necessary because server name detection may fail in command line scripts and will show up only as "localhost" in the xml files.
 * (included in 1.12.0; may not be included in 1.14.0 (verification needed)

 
 * Whether or not to compress the sitemap files. The default setting is.

Alternative Version

 * User:DaSch/generateSitemap.php