I'm looking at starting a new project, but I've not done anything like this before. I'm hoping someone with more experience will be able to offer me advice on this one.

The site revolves around geographical structure. It's the UK, cut into 50 parts. Each part has many towns, and within each town, many services. Each of the 50 sites will be a different URL, all running on a multisite.

It's going to take quite a while to set up the first area, and all the towns. All towns and services will be categories in the admin panel. Once this is done, I need a fast way of populating the other 29 installs! I'll be seeking a way to effectively "find and replace" town names, so that page titles, meta and categories can be re-used over and over. Is this possible? How would you tackle this? At the moment, I've no real ideas, apart from sitting here with PHP and seeing if I can pass a huge array of towns through a function which adds categories for each town and inserts them into the database...

I know this isn't a question, like "how do I fix this code" but I don't know how to plan for this, and with no plan I think I'm stuffed :)

  • You could write an SQL to insert the data right into the database. So in the case off adding categories. You would need to add the category to the wp_terms, to the wp_term_taxonomy table and to the wp_term_relationships table. You could so as you suggested. Have all town in a array, and run it in a FOR loop to insert each category. – gdaniel Apr 26 '13 at 21:14
  • Yes, confirms my thoughts. MySQL is probably the way forward here. I need to get my learning MySQL book back out...so much to learn! – Dan Apr 29 '13 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.