Skip Navigation

[Closed] Exporting and (re)importing posts and relationships

This support ticket is created 3 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 0.91 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 15 replies, has 2 voices.

Last updated by Shane 3 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1651615

Hello,

I would like to export all posts with their associated M2M relationships.

Once exported, I will then make a number of changes to each post, including changing their M2M relationships.

Once finalised, I would like to import and update all posts, including the M2M relationship data in the upload file.

Can you please advise how to do this?

Many thanks,
Cat

#1651901

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

I would recommend having a look at our documentation below.
https://toolset.com/documentation/user-guides/export-import/how-to-import-content-into-wordpress-using-csv/import-csv-ultimate-csv-importer-plugin/

You will also need to use Ultimate CSV export plugin in order to export the website data because Toolset itself doesn't export the Contents of your site, it can only export the components of Toolset.

Also the Ultimate CSV importer will be able to import your M2M relationships as well when you make the modification.

Please let me know if this helps.
Thanks,
Shane

#1652101

What alternatives are there to Ultimate CSV improter?

Last time I used the plugin it corrupted all my data. I do not want to risk that again.

#1652135

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

#1652151

Thanks Shane.

Do you know how I can export posts incl. relationships using these plug-ins?

#1652161

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

Unforutnately no I don't have any information on how to export the information itself. What you can try doing is to contact the support forum for the plugins to see if they can provide any information on how to get this done.

I know that these plugins should provide a way to export your data as CSV.

Thanks,
Shane

#1653927

Hi Shane,
I have read through the links you shared but still unsure how I can do the first task - export all [Toolset posts] with their associated M2M relationships.
Can you please help?
Thanks,
Cat

#1654389

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

Ok I did some consulting with my team on this one and you can actually export the Relationship information but as an XML. I've been trying to find a plugin that could export the relationships as a CSV but wasn't able to.

If you go to Tools -> Export you can use the default wordpress exporter to export the Posts with the relationship information.

You will see a meta section in the xml called "<wp:meta_key><![CDATA[_toolset_associations_owner-hotel]]></wp:meta_key>"

This will contain the relationship information. I must apologize for the lack of information as I can see that we have little to know information on how to export the post data itself.

Please let me know if this helps.
Thanks,
Shane

#1654619
export.png

Hi Shane,

I'm in Tools -> Export to use the default wordpress exporter to export the Posts with the relationship information.

What should I be selecting to export here?

- In this instance, each post is a "National listing"
- The M2M relationship is between "Support Categories" and "Support Sub-categories"
- Each "National listing" post is linked to one or more "Support Sub-categories"

I would like to export all "National listing" posts so that I can see the "Support Sub-categories" which they are linked to.

I had attempted to export the intermediary posts but this did not provide the information you referred to.

Thanks,
Cat

#1654653

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cat,

You will need export each component of the relationship, this means you will need to export the posts and taxonomies involved.

So export National Listing, Support Categories, Support Sub-categories and any other Items that are apart of your relationship.

Then you can check your XML file that is exported to modify the information.

Thanks,
Shane

#1655217

Hi Shane,

Sorry for any confusion but what I mean is that I don't want the post and relationship data separately.

I would like to see the details for each National Listing post including which Support Sub-categories each post is linked to.

I don't understand how to get this information.

Does this make sense?

Cat

#1655737

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

I see what you mean now but that won't be possible.

Given that the Post Relationship is across multiple Post Types, there is no way to export it as how you want it.

The export will put the relationship information in each of the Post Type that is exported.

I would like to see the details for each National Listing post including which Support Sub-categories each post is linked to.

This information is there in the export files for each post type but you will need to check the exports individually and ensure that any modification made in 1 file is consistent among your other files.

Please let me know if this explanation was clear or if further clarity is needed.

Thanks,
Shane

#1655949

Thanks Shane,

Can you expand on the instructions required for this action please, specifically which export files are you referring to?:

- This information is there in the export files for each post type but you will need to check the exports individually and ensure that any modification made in 1 file is consistent among your other files.

Thank you,
Cat

#1656099

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Catriona,

Im referring specifically to the Post Types in the National Listings relationship. This will include the Parent, Intermediary Post Type and the child.

In each of those you will see that there is a line similar to this below in the XML file.


<wp:meta_key><![CDATA[_toolset_associations_owner-hotel]]></wp:meta_key>
<wp:meta_value><![CDATA[<em><u>hidden link</u></em>;

This is the link you will modify for the relationship. What exactly is the modification you want to make ?

Please let me know.

Thanks,
Shane

#1656259

Hi Shane,

Currently each National Listing contains the details of a support service available for one or more Support sub-categories. For example, a National Listing could contain the detilas of a charity helpline that offers advice for those diagnosed with cancer.

We are wanting to recategorise all listings to new categories and sub-categories to improve navigation on the website. The aim is to make it easier and quicker for individuals facing crisis to find help quickly. For example under the "health" category we have the subcategory "cancer". We will be looking to change this so that "cancer" is a category and "breast cancer" "prostate cancer" "bowel cancer" etc. are all sub-categories.

In order to do this easily (we have 1700+ listings) I think we need to:

- Export all National Listings posts with their associated support sub-categories (into CSV file)
- Map 'new' support sub-categories and categories, identifying where 'new' and 'old' support subcategories match
- Set up M2M relationships in toolset
- Run "find and replace" style function on the CSV file so that we can automatically suggest replacements where 'old' subcategories match 'new' subcategories (some of these will require manual review)
- Review and confirm changes
- Import all posts with new associated sub-categories

Am I going around this the right way? Is there any documentation I can look to for guidance?

Many thanks,
Cat

The topic ‘[Closed] Exporting and (re)importing posts and relationships’ is closed to new replies.