• Resolved Scordisian

    (@scordisian)


    I just moved and migrated my Drupal 7 to WordPress.
    Thus far all is going well but I need some assistance with changing data in the MySQL database that wasn’t properly changed during the migration. I was hoping someone could assist me with this as I am not that well acquainted with phpmyadmin and SQL commands.

    It both involves the wpxn_posts table.
    The media paths have changed but the old urls in the post_content row still list as /sites/default/files/ and I would like to search, match and bulk change this into current WordPress folder(all files are in the 2017 folder).

    The second one is a bit tricky as it concerns forum posts.
    I want to change all post_type topic which have a post_parent of 0 into a post_parent of 3270

    This way all forum topics are moved into the correct assigned forums and I am basically up and running again. Any help is appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Use the plugin “better search replace” as it works nicely with serialized data to deal with image URLs.

    The second one should be a pretty straight forward bit of SQL that you could run from phpMyAdmin.

    Thread Starter Scordisian

    (@scordisian)

    Hi Steve,

    Thnx, the plugin worked like a charm. Thats all fixed now.

    As for the SQL I was thinking of this:

    UPDATE wpxn_posts SET post_parent=’3270′ WHERE post_type=’topic’;

    But I am not a SQL wizzard so I am hestitant to run this one.

    Thread Starter Scordisian

    (@scordisian)

    I fixed it, here is for future reference:

    UPDATE wpxn_posts SET post_parent=3270 WHERE post_type=’topic’;

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Cool. I would have said “try it, but backup first.”

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Assistance with SQL commands’ is closed to new replies.