Extension talk:Google Sitemap

How to run the PHP file from DOS?
How do you run the file? See http://jrandomhacker.info/MediaWiki_tricks_and_tips#generateSitemap.php. Basically, at a DOS command line you type

php generatesitemap.php mywikipedia

On my particular box, since PHP.EXE isn't in the path, I would have to type

c:\wamp\php\php generatesitemap.php mywikipedia

This would be done at C:\wamp\www\mywikipedia\maintenance>, so the full text showing on the command line, including the prompt, would be

C:\wamp\www\mywikipedia\maintenance>c:\wamp\php\php generatesitemap.php mywikipedia



$wgScriptPath or $wgHiddenPath
I'd just like to state that on a good number of wikis. That is, mostly the ones that use the trick to change domainname/index.php/articlename into domainname/wiki/articlename. Using the wgScriptPath variable like this extension is built to the link on the specialpage will actually lead to a article called sitemap.xml instead of going to the actual xml site map. If you are using this trick to make the link point to the correct spot you need to change the two occourences of "$wgScriptPath" in the includes/SpecialGooglesitemap.php file into "$wgHiddenPath" which is traditionally the variable used not for the Articles but the files. Dantman 07:28, 27 October 2006 (UTC)

allowing sitemap for spezial ip
is it possible to allow an ip to execute the site? because so i could use an cronjob quite easy. tia MIK

p.s.: if you have problems with url-rewrite that is mentioned above, simply add this line to your .htaccess RewriteRule ^sitemap.xml$ - [L]

i changed the end, so that google is notified of the new sitemap.xml
/** function wfSpecialGoogleSitemap {       list( $limit, $offset ) = wfCheckLimits; $gsitemap = new GoogleSitemapPage( $offset, $limit ); $gsitemap->initialize; $gsitemap->finalize; $handle = fopen('http://www.google.com/webmasters/sitemaps/ping?sitemap=http%3A%2F%2Fwww.yourdomain.tld%2Fsitemap.xml', 'r'); while (!feof($handle)) { $buffer = fgets($handle, 4096); #echo $buffer; }       fclose($handle); } ?>
 * Entry point.

don't forget to change the url to your own.

Special:Version
In 1.8.2 when I add this extension the Special:Version page returns blank. The extension seems to work just fine, but I have to add it to LocalSettings.php when I want to run it and then remove it so I can see the Version info. Same problem for mee too (http://www.self-qs.de) Same here on Version 1.9.0
 * Same at . --LRG 07:31, 23 March 2007 (UTC)

.htaccess redirecting
I have a redirect in my directory so that all links shows like http://domain.com/Page1. My problem is that Extension:Google Sitemap is generating a link like this http://domain.com/wiki/Page1. I need your help in order to take off this “wiki” from the generated link. Thanks a lot, mauro.

Google Authentication not described
Please add Instructions on how to enter the Meta-Tag Code to the MediaWiki Styles. There is no Info at mediawiki.org. I cant authenticate my Site on the other Filebased way.
 * You can not authenticate your site the filebased way, because any one with editing privileges on your wiki could create that page. To add the meta-tag, edit your MonoBook.php file at yoursite.com/skins/MonoBook.php (or yoursite.com/wiki/skins/MonoBook.php) to include your google verification metatag (something like ).  Insert this code just below which appears near the beginning of the file.  I hope that helps.  --LRG 07:35, 23 March 2007 (UTC)

Your Sitemap does not appear to be in a supported format
I get this error after submitting my sitemap.xml for Goole to read. Any ideas why this would be? The Sitemap is located at http://www.chesterwiki.com/sitemap.xml

I think it is because my wiki is located in my root directory (ie public_html)> Could this be why?

Is there a limit on the number of pages?
I seem to be hitting a 5000 page limit for this extension. Is there a limit built in? The site, http://www.appropedia.org is growing quite fast and we need to be able to have a sitemap larger than 5000. What are other sites doing? Thank you --LRG 07:38, 23 March 2007 (UTC)

sitemap.xml location
how to put it at the root of the site & not at the root of mediawiki folder. ty --Vev 12:00, 24 March 2007 (UTC)

In the SpecialGoogleSitemap.php you will find a line that creates the variable $file_name. Presuming that your wiki is one level below root (i.e. /wiki) change "sitemap.xml" to "../sitemap.xml". It's not super elegant, but it works.

Works on 1.6.1
I have tested the latest version (0.0.5) on MediaWiki 1.6.1 and it works fine. Lcarsdata 12:31, 31 March 2007 (UTC)

generateSitemap.php in MediaWiki 1.6+
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. This notice box is copied from the extension page, in case you get to this talk page first. Is there a talk page for the generateSitemap.php that is included in new versions of mediawiki? --LRG 18:28, 17 April 2007 (UTC)


 * I'm not aware of one either, and I have a question about generateSitemap.php. Is there a way that I can run it, so that it generates just one big file that contains all of my namespaces?  The way it works now, it generates a separate file for each namespace, which is annoying.--Duke33 02:13, 6 June 2007 (UTC)

What the hell does that tag mean??!! I'm having a really hard time trying to figure out how to create a sitemap for google for my site http://www.pop-cult.org/Wikitainment/index.php/Main_Page. I'd appreciate any help.

I didn't understand how to do the following either: You must create the file sitemap.xml in your root directory, and chmod it (change permissions) to 777 before running Special:GoogleSitemap

I supose I'll just have to create an empty file "sitemap.xml" and then fill it, just like I did with the extensions...but fill it with what? I also don't have a clue of what does change premissions mean. Thanks beforehand. --Pop-Cult 22:17, 4 July 2007 (UTC)

I am unsure how to even go about running the tool. It returns telling me I do not have access, even after changing it. I am unsure how to run a commandline on the wiki.

generateSitemap.php: command not found
I can't run generateSitemap.php in maintenance/generateSitemap.php in my MediaWiki directory. The error is generateSitemap.php: command not found. Please help.

Finally figured it out
I finally figured this out (after way too long working on it). See http://forums.appropedia.org/blog/making-sitemap-opensource-documentation-wild-goose-chase for how I did it. Or check out the following links for where I got most my information: Enjoy, --LRG 07:12, 30 December 2007 (UTC)
 * http://dralspire.com/node/219
 * http://jrandomhacker.info/MediaWiki_tricks_and_tips#MediaWiki_and_Google_Sitemaps
 * http://www.google.com/support/webmasters/bin/answer.py?answer=35655