Page 1 of 1

[MSU Sitemaps] Overcoming Google's 50,000 item sitemap limit

Posted: Tue Aug 24, 2010 10:38 am
by NeilColeclough
Recent additions to my product list mean that the sitemap now has 50,260 items. Google won't accept sitemaps with any more than 50,000 items and so is rejecting the sitemap. Is there a way to configure sitemaps.php to generate multiple product sitemaps with fewer than 50,000 items each? If not, as a workaround for now, how can I get rid of the new products sitemap?

Re: [MSU Sitemaps] Overcoming Google's 50,000 item sitemap l

Posted: Wed Aug 25, 2010 8:49 am
by NeilColeclough
For any others encountering this problem, this is how I fixed it.
I made a copy of sitemaps/products.php and saved it as sitemaps/products2.php

In sitemaps/products.php find

$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");


and change it to

$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND p.products_id <= '26000' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");

(*note - change the 26000 value to the middle product_id value for your store if you need to)

In sitemaps/products2.php find

$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");


and change it to

$result = tep_db_query("SELECT p.products_id, p.products_date_added, p.products_last_modified FROM ".TABLE_PRODUCTS." p, ".TABLE_PRODUCTS_DESCRIPTION." pd WHERE p.products_status = '1' AND p.products_id > '26000' AND pd.products_id = p.products_id AND pd.language_id = '".$langId."' ORDER BY p.products_id DESC");


(again, change the 26000 value if you need to)

Resubmit sitemaps.php to Google and hey presto your products are now split into two sitemaps both of which are within Google's limit. Green ticks all the way!

Cart  
(empty)

Cart Check out  »

Prices are tax inclusive.

The VAT rate for your country (US) * is 0,0 % because it is not a member of the European Union (EU).

* Please create an account if your country does not match.

Community feed
  • [phpBB3] AJAX Userinfo Extension
    Hi! I'm having trouble with this extension: https://www.phpbb.com/customise/db/exte ... _userinfo/ I tried asking support from the author but for no avail, since now. My request for support...
    by Lord Phobos
  • [phpBB3] Upgrade to phpBB 3.2.3
    Hello.. after Upgrade to phpBB 3.2.3 I am getting this message.. How can I solve this issue..? Thank you
    by ingbrzy
  • [phpBB3] URL path changed
    Hello.. I have changed my site path after moving to new hosting and now can not activate SEO module.. new path http://www.miuios.cz/domains/miuios.cz/ could you help me? thank you
    by ingbrzy2
  • [phpBB3] Chinese language support
    Hi, i bought magic seo for phpbb because it says that it supports a wide range of alphabets and UTF-8, however i found that it doesn't. I'm preparing a website in Chinese and all forums having a...
    by iwsmike
  • [WP2PS] Yoast SEO plugin
    Thanks for your support installing the PS-WP integration. However there is some errors when PS-WP integration is activated. 1. Error generating sitemap with Yoas SEO plugin (it disappears when...
    by argidomin
Join our support forum » Pre-Sales Questions »
Featured Testimonials

I have checked our website and it works faster than before, thank you very much!

Jorge, the owner of TN-TOOLS

We installed the WordPress Accelerator plugin and it's great! With 2 other plugins the website is blazing fast!!

Milko, the owner of Boxershorts Heren

More Testimonials »