WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Export Posts then Re-import with changes, possible? (9 posts)

  1. MCM
    Member
    Posted 1 year ago #

    I would like to export all my posts (custom posts actually) as say CSV FILE FORMAT, including there custom fields, I would like to then MASS EDIT them.

    On importing them, I would like it to UPDATE (the existing posts) with the data changes and possibly one or two more custom fields.

    Is this even possible?

  2. s_ha_dum
    Member
    Posted 1 year ago #

    It is possible but may not be a 'beginner' project, especially the part about adding custom fields. Can yo tell me exactly what you need to edit and why?

  3. Peter_L
    Member
    Posted 1 year ago #

    Definitely not a beginner project. Probably possible using mysql. Can't help you with this but one advice: take back-up before doing anything.

  4. s_ha_dum
    Member
    Posted 1 year ago #

    Actually, I think there may be a couple of circumstances/techniques that might allow a beginner to pull this off. I have to test my suspicions before suggesting anything though. I'd rather see if there is a better way though-- like MySQL replace() or something.

  5. MCM
    Member
    Posted 1 year ago #

    Thanks, well in short I have hundreds - actually I think thousands) of custom posts that have geo_address field (post_meta) populated.

    However, I do not have the lat/long and to manually update these would be a nightmare.

    1. I found this great plugin that can geocode these posts for me, so I played around and figured that if I could just have a copy of my posts in a CSV format,

    2. I could import into this plugin (simplemap locations) and then have it geocode then upload again to my website with those two extra fields (geo_latititude and geo_longitude),

    THEN

    3. geomashup can update its fields and bang the maps work.

    I have tried and tested steps 2 and 3 as I am about to upload a CSV file now that I prepared but these posts are not on the website so it is new.

    I would like to export my current posts, perform steps 2 and re-load then do step 3.

  6. s_ha_dum
    Member
    Posted 1 year ago #

    What kind of plugin does the geocoding? A WordPress plugin? If that is the case you could probably do this in place, either by

    1. Building a loop that runs once, checks your posts, geocodes and adds the fields via the plugin.
    2. Or checks the post on page load (front end and/or backend) and adds the geocoding information if and only if the post doesn't already have it.

    I'd favor the first option but you could get execution timeouts.

  7. MCM
    Member
    Posted 1 year ago #

    IF I come with something, will post here.

  8. MCM
    Member
    Posted 1 year ago #

    IF I come with something, will post here.

  9. MCM
    Member
    Posted 1 year ago #

    Never found a way to do this, thanks all.

Topic Closed

This topic has been closed to new replies.

About this Topic