Sitemap not working

I uploaded the directory and files exactly as per instructions:

/all-in-one-seo-pack/ - goes in /wp-content/mu-plugins
all_in_one_seo_pack.php - goes in /wp-content/mu-plugins
simple-sitemaps.php - goes in /wp-content/mu-plugins
sitemap.php - goes in /wp-content

Yes, sitemap.php is in wp-content and not in mu-plugins. Since it is not generating a file named sitemap.xml in the root, I wonder if the error is in my htaccess file?

Instructions said: Add the following to your .htaccess under the line that handles uploaded files:
RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]

Here is my .htaccess file content:

--------------------------------
RewriteEngine On
RewriteBase /

#uploaded files
RewriteRule ^(.*/)?files/$ index.php [L]
RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
RewriteRule ^(.*/)?sitemap.xml wp-content/sitemap.php [L]

# add a trailing slash to /wp-admin
RewriteCond %{REQUEST_URI} ^.*/wp-admin$
RewriteRule ^(.+)$ $1/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule . - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

php_value memory_limit 32M
php_flag display_errors On

<IfModule mod_security.c>
<Files async-upload.php>
SecFilterEngine Off
SecFilterScanPOST Off
</Files>
</IfModule>

Options -MultiViews
ErrorDocument 404 //27480.php

--------------------------------
Any suggestions?

  • drmike

    Please define "not working" Is the sitemap not being generated? Are you getting an error? Are the teamsters on strike again?

    I know with some sitemap modules for some platforms I work with, you have to generate more content (ie write a post since we're talking about wp) before a sitemap kicks out. Not sure if Andrew has worked this one like that.

    Can you please provide a link to a sample site where you've used this plugin? A link to the sitemap is (or where it should be) would also be a plus.

    edit: The htaccess file looks fine to me.

  • col235

    Hi drmike,
    Thank you for your quick response!
    No errors of any kind, just that the sitemap.xml file does not appear in the root directory.
    When I logged in as a user I did see the SEO options on the write post toolbar, so that is working. But no go as of yet on the sitemap.
    I did write some test posts thinking that might trigger the generation of the sitemap.xml file, but that didn't work. I even tried manually creating a file called sitemap.xml and setting permissions on the file to 777, but that did not help.
    The site is: http://lwww.learnshareact.com/
    WordPress MU 2.7 running BuddyPress
    I expected the sitemap to be at http://lwww.learnshareact.com/sitemap.xml if it generates.

  • drmike

    That second link comes right up for me. No problems what so ever.

    The sitemap, like Posts and Pages within wp are all dynamic. They're not actual files within your hosting space if that's what you're thinking.

    What ironic about this is I'm sitting here generating static sitemaps for one of my sites currently. I can do it like a plugin but doing it via an outside script also checks for missing files and broken links.

  • col235

    drmike, Thank you!

    Silly me, I expected to see a static "sitemap.xml" file in the root directory, as I do on my standard WP sites using the Google sitemap generator.

    After visiting http://lwww.learnshareact.com/sitemap.xml, I see that this is creating a sitemap for blog posts from the site admin account, but the sitemap does not appear to be picking up posts from the WPMU user blogs.

    As an example I just started a new post as a user:
    http://learnshareact.com/sustainable/2009/03/14/can-google-help-fix-the-grid/

    That does not appear in the sitemap.xml file. Any ideas?

    Thank you!

  • drmike

    Silly me, I expected to see a static "sitemap.xml" file in the root directory, as I do on my standard WP sites using the Google sitemap generator.

    I'm assuming that you mean Arne's plugin. That's what we use on our installs although it took a small amount of work to get going. There's a rather lengthy thread over on the mu forums about it. It's the same basic principle as the avatar plugin here with taking a duplicated wp-content/blogs.php file. At least that's how I explained it.

    After visiting...

    It generates a sitemap per blog. It's not a sitewide solution. I know there was a recent thread also on the mu forums about finding a sitewide solution but I don't recall anything coming out of it. I don't know of one that is usable for a standard mu install.

    Do you have a program that you might suggest to generate static sitemaps that works for WPMU member blog posts?

    Here;s the one I point folks towards:

    http://www.auditmypc.com/xml-sitemap.asp

    Seems to work better in IE with Microsoft's Java over Firefox with Sun's version. Go figure.

    Since you;re using subdirectories, it should work fine for you. I don't know about subdomains.

    One trick you can do if you're concerned about getting everyone. Create a Page marked as Private, create a Page Template for that Page that lists all of your public blogs for your site, and start off the Java sitemap pointed at that instead of your home page. Just be sure to manually remove that starting page before submitting your complete sitemap.

    Takes me about 90 minutes to run through 4k pages at 6 spiders at a time with a 1 sec request delay. Also helps with finding broken links.

    Hope this helps,
    -drmike

  • Shelley Keith

    I just uploaded the newest version of this plugin over older files that weren't working. I assumed there was something wrong with the files.

    It's supposed to generate virtual sitemap.xml for each site in an MU install correct? So there would be one for the root install, and one for /1/sitemap.xml and one for /2/sitemap.xml...right?

    Mine isn't working that way. The /sitemap.xml at the root only displays posts, not pages, and the /x/sitemap.xml is showing nothing, even after updates in the site content. I've checked several sites in a 50 site MU install.

    I've double checked the plugin install, it's in there correctly and not throwing any errors. The .htaccess file entry is correct and in the right place.

    My question, is there a known conflict outside of Google Sitemaps? I've not got that installed so it shouldn't be an issue. Is there anything else I can look at to find the problem?

  • drmike

    Welcome to WPMUDev. :slight_smile:

    The /sitemap.xml at the root only displays posts

    That's the way it's supposed to work. Both those plugins are simplified versions of the real things. In the sitemap plugin, it only displays the first (oh I forget the quantity, it's either like 10 or 50.) posts from a blog.

    If you need a full sitemap, Arne's would probably be best although there is some confusion about if it works on 3.0.x or not. Not sure what version of the software you're running.

    I've checked several sites in a 50 site MU install.

    It's always a plus to give specific links when making a reference. We may see something that you don't. Most support forums operate in such a manner.

    not throwing any errors

    You are checking the webserver's error logs, right? Please check if your not.

  • Mason

    *Edit* Dang drmike is fast! Glad he's on our side.... :smiley:

    Hiya Shelly,

    Our sitemaps plugin is not designed to list everything, just the most recent post. I think the max is 30, which can be changed on line 29 in the plugin source if needed.

    Also, check out this thread here:
    https://premium.wpmudev.org/forums/topic/sitemapxml-only-in-main-blog

    I don't think Google reads the sitemaps for individual sites on a sub-domain install, but maybe someone else can chime in and provide some further clarification.

    Thanks! :smiley: