Google Sitemap

Hi there,

Is there a plugin that makes a sitemap? I would like to submit the sitemap to Google and other search engines that accept sitemaps.

Thanks

Comments

  • I would also be interested in something like this.
  • yes, there is. statusnet/scripts/sitemap.php
  • @aric But it says this must be run from the command line. How do i plug this into Google for instance? and it looks like from looking at the code that once this is done you have to redo it manually each time to include the next notices, is that correct?
  • @PaulOgier you generate it once or daily, say as a cronjob, the script submits the site map to google
  • @aric I made a cron job @ dreamhost. Under the cron job I put in this line.
    /usr/local/bin/php /home/user/sitename.com/scripts/sitemap.php

    I have asked for the job to be emailed to me when it is done and this is what comes back.

    Parse error: syntax error, unexpected '{' in /home/user/sitename.com/lib/common.php on line 131

    Line 131 is this : StatusNet::init(@$server, @$path, @$conffile);

    Please advise.
  • @aric Is there any news on this?
  • @TweXXX cgi mode is not well supported, please ask dream host to contact us, we provide support for them, but they must be the ones to make the necessary changes.
  • @aric I have contacted dreamhost and they have said that they will contact you.
  • /usr/local/bin/php /home/user/sitename.com/scripts/sitemap.php

    Parse error: syntax error, unexpected '{' in /home/user/sitename.com/lib/common.php on line 131

    That's php4 on dreamhost servers.

    Try:
    /usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php
  • @samnoble thanks for the tip, will try now.
  • @samnoble @aric I changed the cron job to :
    /usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php

    And now it says this:

    Error: output directory does not exist.

    What directory must i make?
  • @TweXX almost there.

    aric@aric-laptop:~/mainline/scripts$ ./sitemap.php --help
    Script for creating sitemaps files per http://sitemaps.org/

    -f Use as output file
    -d Use for new sitemaps
    -u Use as root for URLs
    General options:

    -q --quiet Quiet (little output)
    -v --verbose Verbose (lots of output)
    -c --conf= Use as config file
    -s --server= Use as server name
    -p --path= Use as path name
    -h --help Show this message and quit.

    here is an example

    cd /var/www/sitename/ && /usr/bin/php -d memory_limit=706M scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://sitename/sitemaps/

  • @aric i am not sure if this is right, is this how the line should read in crob job?

    cd /home/user/sitename.com/ /usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u

    It doesn't seem to be working, I am not getting an email to say it is working but also can't find a sitemap file, which I assume is called sitemapindex.xml.

    Please help.
  • @TweXX when you run this directly what is the output?
    its really hard to tell whats going on if you cat see the response the script is giving.

    /usr/local/php5/bin/php /home/user/sitename.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u

    Also why did you leave out the arguments after -u? that part is important.
    and do you have a driectory in /home/user/sitename.com called sitemaps and is it writeable?

    output from the script would answer these questions I believe. you could try running it locally, if you have a local install of statusnet.
  • @aric trying with the new stuff @ the end dunno how i missed that, so this is what is running the next couple of hours:

    cd /home/out07/twexxx.com/ /usr/local/php5/bin/php /home/out07/twexxx.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://twexxx.com/sitemaps/
  • @aric this is sorted. Dreamhost helped me with this, this line needs to be on its own line and then all others will work.

    cd /home/out07/twexxx.com/


    So this is the full code:
    cd /home/out07/twexxx.com/
    /usr/local/php5/bin/php /home/out07/twexxx.com/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://twexxx.com/sitemaps/

    Thanks for your help on this!
  • When I run this: /var/www/sitename.com/www/root/scripts/sitemap.php
    I get:
    -bash: /var/www/sitename.com/www/root/scripts/sitemap.php: Permission denied

    Why is that ?
  • @bedio php sitemap.php --help

    Script for creating sitemaps files per http://sitemaps.org/

    -f Use as output file
    -d Use for new sitemaps
    -u Use as root for URLs

    --you need to define these.

    Also it you get the latest version of statusnet from gitorious there is a sitemap plugin, enable it and go to sitename.com/admin/sitemap and you can add you bing google and yahoo keys and then run "php /statusnet/plugins/sitemap/scripts/updatecounts.php"

  • I still get
    Permission denied

    when I run
    /var/www/domain.com/www/root/scripts/sitemap.php -f sitemapindex.xml -d sitemaps -u http://domain.com/sitemaps/
  • Ok, it works like this:
    php /var/www/domain.com/www/root/scripts/sitemap.php -f sitemapindex.xml -d /var/www/domain.com/www/root/sitemaps -u http://domain.com/sitemaps/

    Regarding the pluggin - I am using 0.9.3, added the plugin in config (addPlugin('Sitemap');) and there is no such menu 'sitemap' in admin.... neither the url /admin/sitemap works...
  • @bedio plugin is not complete in the 0.9.3 release get the latest version of statusnet from gitorious
    and then enable the plugin.
  • could you give me e link, as I cant find my way around this gitorious
  • I got it, also I needed to add:
    $config['admin']['panels'][] = 'sitemap';

    in order to see the panel... :)
  • @bedio good call, totally forgot about that.
  • @aric i have just checked and i have over 10000 posts to the site but the sitemap has only got 1517 urls in the sitemap. Is there something that i need to do. I have rerun the chron job. I have also deleted the created the xml files and recreated them and still all the notices have not been made. I am running 0.9.4
  • Maybe you can try this tool sitemap x which i am using now. More detailed info: http://www.sitemapx.com/Xml-Sitemap.html. Hope it can help you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID