Google SiteMap For WordPress MU Plugin 1.513101
As mentioned in my previous blog post “SiteMap For WordPress MU“, not only did I claimed to get the sitemap for WordPress MU working, I also show you my WordPress Mu at NewsFreez.com.
Now I am going to reveal the steps to get the SiteMap For WordPress MU working for you. Here are the steps:
1. Upgrade your Google XML Sitemaps plugin to 3.1.0.1. or above.
2. Unzip google-sitemap-generator.3.1.0.1.zip.
3. Open sitemap-core.php and find the first second
return $res;
4. Before the above code, add the following code
global $blog_id;
if ($blog_id != 1)
{$res .= ‘wp-content/blogs.dir/’ . $blog_id . ‘/files/’;}
5. Upgrade your WordPress MU to 1.5.1 or above.
6. Unzip wordpress-mu-1.5.1.zip.
7. Open wp-includes/functions.php find
‘htm|html’ => ‘text/html’,
8. After the above code, add the following code
‘xml’ => ‘text/xml’,
9. Open wp-content/blogs.php find
‘htm|html’ => ‘text/html’,
10. After the above code, add the following code
‘xml’ => ‘text/xml’,
11. Open .htacess and find
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
12. After the above code, all the following code
RewriteRule ^(.*/)?sitemap.xml wp-content/blogs.php?file=sitemap.xml [L]
RewriteRule ^(.*/)?sitemap.xml.gz wp-content/blogs.php?file=sitemap.xml.gz [L]
13 Upload with FTP the unzipped wordpress-mu-1.5.1.zip
14. Upload with FTP the unzipped google-sitemap-generator.3.1.0.1.zip into the wp-content/plugins folder.
15. Login to your main dashboard, go to Site Admin/Options.
16. Under “Upload File Types”, replace this
jpg jpeg png gif mp3 mov avi wmv midi mid pdf
with
jpg jpeg png gif mp3 mov avi wmv midi mid pdf xml xml.gz
17. Activate Google XML Sitemaps. If you are using Plugin Commander, goto Site Admin/Plugin Commander and activate Google XML Sitemaps.
18. Go to Settings/XML Sitemap, under Location of your sitemap file, click on “Custom location”.
19. For “Absolute or relative path to the sitemap file, including name.”, use
/home/xxxxxxx/public_html/wp-content/blogs.dir/1/files/sitemap.xml
20. For “Complete URL to the sitemap file, including name”, use
http://domain.com/sitemap.xml
21. Click on “Update Options” and check your main sitemap.xml.
22. Go to one of the subdomain dashboard, goto Write/Add Media.
23. Click browse, pick any image, click open and upload.
24. Go to Settings/XML Sitemap, under Location of your sitemap file, click on “Automatic detection”.
25. For “Detected Path.”, it should be
/home/xxxxxxx/public_html/wp-content/blogs.dir/x/files/sitemap.xml
26. For “Detected URL”, it should be
http://subdomain.maindomain.com/sitemap.xml
27. Click on “Update Options” and check your subdomain sitemap.xml.
28. Go to Google Webmaster Tools, submit all your sitemaps.
You should get all your sitemap for WordPress MU working by now. Comments are welcome.
Popularity: 6% [?]
Like this post? Subscribe to my RSS feed and get loads more!




























25 comments
sgPing on June 25, 2008 at 3:07 pm
Google SiteMap For WordPress MU Plugin 1.513101 | Richard Palace dot Com…
As mentioned in my previous blog post “SiteMap For WordPress MU“, not only did I claimed to get the sitemap for WordPress MU working, I also show you my WordPress Mu at NewsFreez.com.
Now I am going to reveal the steps to get the SiteMap For WordPress…
illway on June 30, 2008 at 6:31 am
Very cool, but when I click Update Options (step #27) it updates the MAIN site’s options, not the sub site.
Is this b/c I’m not using subdomains? My sites are set up like: http://domain.com/site-id-2
Any ideas?
Richard Palace on June 30, 2008 at 3:42 pm
Hi illway,
The steps above are for WordPress Mu using subdomain.,
Does your main sitemap work using the custom setting?
When you go to user dashboard, what is the automatic detection detected path and url?
illway on July 1, 2008 at 7:30 pm
Thanks for the response!
1) Main sitemap works using the custom setting ‘absolute or relative path’ wp-content/blogs.dir/1/files/sitemap.xml … but it does not work at domain.com/sitemap.xml
2) User dashboard, automatic detection is set at:
Detected Path: /home/domain/webapps/wpmu/sitemap.xml
Detected URL: http://domain.com/hioctanevintage/sitemap.xml
Richard Palace on July 1, 2008 at 11:51 pm
I just found out that in step 3, you have to go to the second $return res;
If you updated it before the first $return res; please remove and update it before the second $return res;
Richard Palace on July 2, 2008 at 12:50 am
I have also updated my other WordPress MU at http://blogfreez.com to prove that it works.
Main sitemap:http://blogfreez.com/sitemap.xml
user sitemap:http://test.blogfreez.com/sitemap.xml
When upload and overwrite a file, make sure the file is transferred. If not sure, upload and overwrite again.
With that, I can move http://newsfreez.com to be powered by pligg.
illway on July 3, 2008 at 6:32 am
Herm… made the changes, but it’s still not working for me. I’m going to have our developer look at it, and I’ll let you know what he finds out. Thx!
BlackMB on July 4, 2008 at 12:48 am
If there’s a solution for sub-directories instead of sub domains, I’d be glad to hear about it…
When I want to update the xml-sitemap options on my customers’ blogs, I get redirected to domain.com/wp-admin/… instead of domain.com/user/wp-admin/… and the changes don’t take effect…
Richard Palace on July 4, 2008 at 1:38 am
Hi illway & BlackMB,
I do have a subdir WordPress MU and i will work on it and let you know.
All blogs have sitemaps! | thripp.com home on July 10, 2008 at 8:12 am
[...] are being created for all thripp.com blogs thanks to Google Sitemap Generator and these modifications. They are created under the root of your blog; i.e. richardxthripp.thripp.com/sitemap.xml. This [...]
Richard X. Thripp on July 10, 2008 at 8:15 am
Hey, thanks for the great guide and step-by-step instructions. I’m using it on my community, and it’s working just as though it were designed for Wordpress MU.
Dolby on July 17, 2008 at 7:11 pm
Also using the subdir WordPress MU setup - will add this comment to be notified of any news. TIA
alfredn on August 2, 2008 at 12:51 pm
Very nice solution however im one of the minority that have my subdmains running as domains, so adding db entries is a painful task and terribly innefficient. I just wanted to mention that to the guys looking for a solution if you’re running a tld-based install of wpmu.
Thanks
sandg on August 24, 2008 at 4:35 pm
Help! I’m stuck at step 21.
I changed the Absolute or relative path to /home/ipunye/public_html/wp-content/blogs.dir/2/files/sitemap.xml
and Complete URL to the sitemap file to
http://shop.ipunye.com/sites/sitemap.xml
Auto Detection is showing:
Detected Path: /home/ipunyec/public_html/sites/sitemap.xml
Detected URL: http://shop.ipunye.com/sites/sitemap.xml
After updating options, I clicked on http://shop.ipunye.com/sites/sitemap.xml but got ‘404 — File not found.’ error. What did I miss?
Tqsm!
Richard Palace on August 25, 2008 at 6:17 pm
Hi sandg,
Steps before 21 is for main domain sitemap.
Your main domain should be http://ipunye.com
Please follow the steps closely.
Tweaking Google Sitemap Generator plugin for Wordpress MU on September 7, 2008 at 11:29 am
[...] easier. However, the plugin requires modification to run on Wordpress MU. I’ve referred to RichardPalace.com’s guide on how to do so, but it requires changes to the core Wordpress MU [...]
Brennan on September 7, 2008 at 11:37 am
Your post on Google Sitemap plugin for Wordpress MU has been very helpful in my implementation of the plugin on my Wordpress MU installation. I’ve come up with an updated article which reduces the amount of tweaking that has to be done on the main Wordpress MU installation itself here.
gsxtasy on September 10, 2008 at 6:39 am
I am getting an error…can someone help me?
Warning: Division by zero in /home/funcity/public_html/wp-content/plugins/google-sitemap-generator/sitemap-core.php on line 957
this is the error on the subdomains
Burton Kent - Acupuncture Marketing Dude on October 3, 2008 at 8:13 am
Hey Richard,
Thanks very much for this. I was looking all over for a plugin that works with WPMU. I had a problem with it though, and am not sure if it’s because of the WPMU features or not.
If the message on the Sitemap Settings page always shows the sitemap was never built, simply change the line with:
$exists = get_option(”sm_status”);
if($exists === false) add_option(”sm_status”,”",”Status”,”no”);
to
$exists = get_option(”sm_status”);
if($exists === false) add_option(”sm_status”,”",”Status”,”yes”);
It may have something to do with Wordpress’s caching, I really don’t know. Hope this helps someone else.
Burton
ceez on October 10, 2008 at 5:18 pm
I get the same error as gsxtasy
Can someone pls help?
Thanks Ceez
ulagam.net on October 19, 2008 at 2:18 pm
hi ceez/gsxtasy,
i too got similar error. but got fixed. its because of the quote that u will copy from this page. it will be like
—
{$res .= ‘wp-content/blogs.dir/’ . $blog_id . ‘/files/’;}
–
instead of
—
{$res .= ‘wp-content/blogs.dir/’ . $blog_id . ‘/files/’;}
–
the different in ‘ and ‘ tends to give you division by zero. the author of this blog has not encoded this coding with code tag
- ulagam.net
Free Tamil blogging Service
Bookmarks about Sitemap on October 24, 2008 at 12:15 pm
[...] - bookmarked by 3 members originally found by ericbrechemier on 2008-10-18 Google SiteMap For WordPress MU Plugin 1.513101 http://www.richardpalace.com/2008/06/25/google-sitemap-for-wordpress-mu-plugin-1513101/ - [...]
konoha on October 28, 2008 at 10:39 pm
I got the same error as gsxtasy and Ceez too.
Thank you!
Log4me » Blog Archive » ????????? on October 30, 2008 at 11:11 pm
[...] ?????? google ????????????????? mu ?????????????????????????? [...]
lutfi on November 11, 2008 at 1:05 pm
Thank you very much.
It works for me.
Don’t forget to change
{$res .= ‘wp-content/blogs.dir/’ . $blog_id . ‘/files/’;}
to
{$res .= “wp-content/blogs.dir/”. $blog_id . “/files/”;}
> single quote to double quote.