Skip Navigation

[Resolved] importing posts from another WordPress site and match our custom post structure

This support ticket is created 6 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 10 replies, has 2 voices.

Last updated by Nigel 6 years, 8 months ago.

Assisted by: Nigel.

Author
Posts
#541063

I am trying to: import a huge number of posts coming from another WOrdpress website (about 1500 posts)

I visited this URL:

I expected to see: we need to create a bulk import of posts by matching them with the custom osts structure we created with Toolset

Instead, I got:

#541346

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Franco

Importing posts is described in the documentation here: https://toolset.com/documentation/user-guides/how-to-import-content-into-wordpress-using-csv/

Can you try following the directions contained there and if you have any problems let me know.

#541375

Hi Nigel, thanks for your feedback.
Does the CSV importer function work also if the starting content comes from a different post type of another WordPress website?
Anyway we will try your tutorial. I keep this ticket open until we did complete the activity.

Best,

Franco

#545960

Hi Nigel,
what we need to achieve is to populate a custom post type made with Toolset with data coming from another wordpress website.
Is there a way to import those data so to match the post type fields we created with Toolset?
With the CSV importer we read that we only are allowed to import normal posts but we need the database data to be imported in our custom post database.
If you need further details to have a more cloer view of out request, please ask.
Best regards,
Franco

#546031

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Franco

I think you have mis-read the documentation about CSV Importer, because you can use it to import custom post type content (our documentation demo is based on a post type of "consultants").

However, I'm not sure if that plugin allows you to update/overwrite existing content.

It sounds like you already have (custom) posts in your database, and you want to add custom fields to those existing posts, is that right?

In that case you might want to try another free plugin "Really Simple CSV Importer": https://wordpress.org/plugins/really-simple-csv-importer/

With that you can have a first column in your CSV file which has the id's of the existing posts on your site, with the rows containing the custom fields for the posts with that id.

The limitations described in the documentation I linked to still prevail: you can only import simple text-based fields and not complex fields such as checkboxes which are stored in the database as serialised arrays.

One final alternative to consider is the excellent paid plugin WP All Import (wpallimport.com).

#546035

Hi Nigel,
what we need to achieve is this:
We have created in a new website a custom post type named "ANNUNCI" and what we need to do is to populate that archive with a different database of custom post types coming from another WordPress website. Those custom posts does not mach exactly with the recordset of our new custom post type "ANNUNCI" so we need to know if there are some techniques to do that, since we have to transfer a database of more than 1500 custom posts.

Thanks for your help on this.

Franco

#546761

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Franco

What are the differences in the data between the source and your new site?

As the documentation describes, the only limitations are on complex custom fields which would be stored as serialised arrays (e.g. checkboxes and select dropdowns).

You set up your new site with the post types and fields you require.

You export the corresponding data from your old site to a CSV file.

You edit the CSV file to prepare it for import, so that the column headings match the standard and custom fields of your new site.

For example, if the old site had a custom post type of "apples" and your new site has a custom post type of "oranges", you just edit the CSV file so that the "post_type" column entries are changed to "oranges".

If your old site had a custom field of "weight in US pounds" you could apply a calculation in the spreadsheet to convert that to "weight in kilograms" and label the column heading accordingly.

Recall that when a Types custom field is stored in the database the slug is prefixed with "wpcf-", so a custom field "weight" would be stored as "wpcf-weight", which is what you would use for the column heading.

If there are some data mappings between the old and new site you are not sure about, please specify what they are so I can help you with that.

#546770

Hi Nigel, thanks for the feedback. Shall we create the base spreadsheet with all our custom fields manually or there is a function that can generate a CSV file with all column headings based on our custom post type?
If we have to create it manually shalll we follow the order of the fields in the fieldset we created or the columns can have no particular order and are mappen accordingly with their related headings?

#546778

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Franco

You can use a plugin to export your data to CSV files, too.

If you search the WordPress plugin repository you will see that there are lots of different plugins available for both exporting and importing CSV files, though they don't all seem to be very well maintained and so you might want to opt for something like WP All Export and WP All Import which clearly are.

The import plugin works a little different to the one described in our documentation, with a drag and drop interface, but is well documented.

Requirements for the order of the fields in the CSV file would come from the import plugin, it is not inherent to WordPress or to Types, so you should choose which import plugin you are going to use, check its documentation for requirements, and organise your exported CSV file accordingly.

Let me know if you run into problems.

#546784

Hi Nigel, we prefer to use a free plugin for CSV import, so that's why I am asking you if it is a method to generate automatically a CSV from the fieldset of the custom post type we created with Toolset, so to allow us to map the importing data to that fieldset.

Thanks.

Franco

#546794

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Well, both of those plugins have free versions available, but as I said above, the requirements for the ordering of columns is determined solely by the plugin you use to import the data, WordPress doesn't care, Toolset doesn't care, so whichever plugin you opt to use will dictate the format of the CSV file to be imported.

However you export the CSV file you can manipulate it in a spreadsheet (Excel, Open Office, Google Sheets etc.), including re-ordering the columns, to get the format your import CSV plugin of choice requires.

I suggest for a small test group of posts you go through the steps and try it, there isn't really any alternative to doing it to know what is involved and what works.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.