Skip Navigation

[Resolved] Possible to import standalone MySQL data to CPTs?

This support ticket is created 7 years, 2 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
- 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 3 replies, has 2 voices.

Last updated by Shane 7 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#566930

This is mostly theoretical right now but I was wondering if it's possible to take existing data -- say, membership data (name + several fields of account data) -- and import that into a CPT with corresponding fields? I'm guessing this would have to be run outside of Toolset/WP in PHPMyAdmin, but is this even feasible? My strength is in CSS/HTML, so I will have to bring in outside help on it, I just wanted to know 1) can it be done 2) what are the steps on the Toolset side to prepare prior to migrating data.

Thanks!

#566949

Shane
Supporter

Languages: English (English )

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

Hi Mike,

Thank you for contacting our support.

Actually yes it is possible because its simply data and as long as its in the standard wordpress defined format or structure then the data will come up.

To prepare you site with toolset for the data all your need to do is recreate the CPT with Types giving it the same slug as the CPT in the data so it can be referenced.

Please let me know if this helps.
Thanks,
Shane

#568141

So if the CPT slug matches the data entry and the fields all correspond based on slugs, will it just be recognized by WP? Or will it have to be imported somehow?

And what if it's on a different MySQL database from the one powering WP?

#568785

Shane
Supporter

Languages: English (English )

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

Hi Mike,

There needs to be a reference to the data so wordpress is able to recognise that the information is there. I the data was imported then it wouldnt show up on the backend, this is why the CPT need to be created in Types with the same slug so that it can be referenced.

Wordpress is only able to access its internal tables so an external data source won't work.

Thanks,
Shane