I'm updating a standard install with about 500 (eek!!) pages to a MultiSite for easier sub-site management.

I basically want to take a sub-page and its children from the root site and copy the data to a new/fresh MultiSite-site.

The WordPress import/export option doesn't work for this so I've had to do it using a MySQL query but I'm completely stumped?

The source table is 'wp_posts' destination is 'wp_2_posts', any ideas?


OK So I worked this out. This query will do the trick of moving the pages:

   INSERT INTO wp_xxx_posts SELECT * FROM wp_posts WHERE post_parent IN


The xxx relates to the destination MultiSite ID (wp_3_posts for example).

The (numbers) in brackets are the parent ID's ('post_parent' in the WP table) of the pages I wanted to import. In this example I imported about 20 pages and there were 2 levels of hierarchy.

The only issue was when the pages are moved no meta data comes over so things like templates, page order and page parent options in the WP dashboard are a bit off. I fixed this by doing a MASS EDIT in the WP dashboard.

Basically select all pages (select all, choose 'edit') and changed the page parent to be a newly created page on the new site. This worked but I had to re-build my page structure.

Anyway, this works if anyone cares to try it :) its not perfect because of the meta but it works for me!

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.