Writing a custom script using the WordPress API to re-categorise over 4,000 articles for a site for which the content structure is changing