![]() |
MediaWiki > MediaWiki tricks and tips >
Important for MediaWiki SEO
generateSitemap.php
∞
SSH into your server, and run:
cd maintenance php generateSitemap.php '''YourSiteName'''
If your URL is http://something.example.com/
then YourSiteName
is something.example.com
and the commandline would be:
php generateSitemap.php something.example.com
You may also use --path index.php
if your site publishes URLs like http://something.example.com/index.php/ArticleName
so the commandline would be:
php generateSitemap.php YourSiteName --path index.php
Make sure that the files it generates are moved to your docroot.
Visit https://web.archive.org/*/www.google.com/webmasters/sitemaps/siteoverview?hl=en and enter http://something.example.com/sitemap-index-mediawiki.xml
(whatever your URL is)
Then wait.
- I had to rename
index.php
toindex.php-
in order to verify my website. I did that quickly, and then renamed it back. - I had to manually edit
sitemap-index-mediawiki.xml
so that its references used my complete URL. -
google sitemap repair 02.sh to rename incorrectly-guessed domain names.