Split large xml sitemaps PHP script

Many people will be familiar with the popular Google (XML) Sitemaps Generator for WordPress I use it on all of my wordpress installs and have been very happy with it. Until about a month ago when I was installing it over at accommodationsphere.com and it created a sitemap for me nicely gzipped and weighing in at only 1-2mbs but a whopping 92,000 urls.

Does google accept sitemaps with that many files? Not unless they’re split across multiple sitemaps which contain less than 50,000 urls each and utilize a sitemap index file.

So I organized a nice little php script that I’ve got loaded in a cron job that runs to split that large sitemap.xml.gz file into smaller .xml.gz files and creates an index file.

It’s a little crude but I’m hoping to get this included as a feature in the above mentioned plugin rather than expanding on this little scripts abilities outright.

You’re free to use it, modify it and do what ever, but be nice; if you develop a bit of extra features or usability for it why not send me the code for inclusion in the next version.

Download PHP XML Sitemap Splitter Version 1.0

Tagged with:
 

Medical Blogging in South Africa

We’ve just created a site for a client in SA medblogs.co.za. The site as it pretty self evident is an open blogging platform aimed at South African Medical Professionals and Med Students. We’re using the lastest version of Wordpress Mu and signed up with WPMUDEV Premium to make use of their fantastic out of the box solutions. Of course we went the tried and trusted ‘edublogs’ theme which was modded a bit.

Overall the project was quick one but it just goes to show how simple automattic has made out lives.

 

SmartSort v2.0 coming soon

FINAL UPDATE: The official page for WP Smart Sort has moved here.

UPDATE: After eagerly anticipating that this script would have been released by now; I’ve come across issues with the extensiveness of the SQL joins the script has been using, in a similar way to smart sort v1. All along I’ve wanted to avoid ‘adding’ or modifying WP in any way but in order for the script to work as I want I’m forced to utilize an “index” table with fields created during script setup in order for this script to have the type of functionality its meant to.

Final version should be released in December. Thanks to those who have left words of encouragement, smart sort v2 is on it way yet!

Thought I’d wet a few people apetites and annouce that I have an ALL new version of smart sort on its way. ETA should be in around a month but might release beta versions before then for testing and comments.

Some of the new features include:

  • Display a drop down menu on category & search pages similar to the ’sort by’ box that is used on YouTube.
  • Additional drop down list allowing the user the option of choosing how many posts per page they want to view.
  • Utilize WP’s built in sort by hooks. The reason for this is to make it as compatable with other plugins as possible.
  • Option to sort by any detected fields in the wp_posts table. (this allows for a modified posts table)
  • Option to sort by any custom fields.
  • Cacheable friendly

I’d like to keep the plugin free but its costing quite a bit this time to get it right so I might need to make it “donationware” but I’ll see closer to the time.

– Dyasonhat —

Tagged with:
 

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Simpler Computing - Wordpress Plugins - Help Desk Plugin