Extension:ManualSitemap

Note: Since MediaWiki 1.6, the MediaWiki core has a Google site map generator which may be more appropriate than this extension. It is a command-line utility, and it is located at maintenance/generateSitemap.php in your MediaWiki directory. The command line is "php generateSitemap.php sitename" and is run from the maintenance directory at the server's command line interface. See Manual:generateSitemap.php for more information.

You should use this extension ONLY if you can't use original utility because of safe mode or some kind of another security settings.

Disclaimer
This extension is a fixed version of abandoned extension Extension:Google Sitemap. Since it is not fixed for already 2 years, I took responsibility, fixed all known bugs and published it here. Also, I am going to fix and complete it in future. Many people, including me, can't use the maintenance scripts...

Please, credit Francois Boutines for original script.

If you have any questions - please see discussion page or take a look at original extension.

About
ManualSitemap is a small, non-intrusive sitemap generator.

ManualSitemap Extension creates a Special:ManualSitemap page which allows you to automatically create and update a sitemap for your Mediawiki site. This allows Google and other search engines to explore your Mediawiki site smarter and faster.

The Special:ManualSitemap page is designed for bureaucrats/administrators. It saves a XML Sitemap file called sitemap.xml (at the root of the wiki by default) and prints some reporting (quite similar to Special:Popularpages).

The XML file has the following properties:
 * it is sorted by decreasing article popularity (ie. highest number of hits).
 * it contains articles only : no redirection pages, nor any other special/external page. However, you can configure it.

In order to produce more relevant Sitemaps, ManualSitemap Extension can also estimate the revision frequency of your pages and associate them a priority according various schemes.

Installation

 * 1) Extract the archive into /extensions directory
 * 2) Add the following lines near the end in the LocalSettings.php file:

Configuration options
There are various options for extension, you can put them into your LocalSettings.php file (before the "requite once") line. However, extension should work even out-of box.

Search engines notification
If servers that fetch the sitemap could not be notified automatically, the warning will be shown. Sometimes web hoster does not allow the fopen command to call urls (allow_url_fopen=false). Also a link where the user can manually inform the server like google will be shown.

Set permissions
You must create the file sitemap.xml in your wiki root directory, and chmod it (change permissions) to 777 before running Special:ManualSitemap.

First step
Visit the new Special:ManualSitemap page and click "update sitemap" button. Then you will be granted a link, put it to your robots.txt (write from new line "Sitemap: " and the link) and Give Google this link.

Updating sitemap
The Special:ManualSitemap page will build a Sitemap out of the all articles (by accepting the wpPriorityType parameter).

To update the Sitemap, simply visit Special:ManualSitemap as a bureaucrat and click "Update sitemap" button.