Support » Fixing WordPress » Inserting posts via MySQL editing

  • I am starting a couple of new sites and I would like to copy a few posts and pages from older sites to the new sites. I would rather simply copy the individual lines for the posts and pages from the original mysql database and then paste those lines into the new sites’ mysql databases.

    What is the safest and easiest way to do this? I know how to do this in the abstract but I’m afraid of messing the whole thing up.

Viewing 8 replies - 1 through 8 (of 8 total)
  • I’m really pretty good with databases, and I wouldn’t go through this sort of hoop.

    Easiest thing really is just to copy n paste to the write window, change the timestamp and submit.

    It’s really that big a hoop? 🙁

    Quick question: why so big a hoop? Keep in mind, this is a new site with like two posts on it, so there’s not a lot of code in there to wade through.

    And my assistants have already gone home for the weekend…bah…

    Of course, you bring up a good idea with the timestamps. If I add the older articles later, I could just change the timestamp.

    Tweaking a database isn’t as easy as it sounds or looks. There are a lot of “hideout” variables – and I’m not referring to settings wherever, I’m referring to things that are not obvious to a user until they jump up, laugh and say “gotcha”. Been there done that….

    Inserting info directly into a database REQUIRES pristine input. Literally. If you’re trying to do this with the normal “idiotproof” notepad, you WILL screw the pooch. I can almost guarantee it. [[Silvermoon’s Law: NOTHING is foolproof to a sufficiently talented fool!]]

    If you’re only talking a few posts, do it the basically foolproof way, PLEASE.

    Ok, it was actually more like a couple dozen posts (the reference to a few posts was to the number of posts on the site now). But if it will risk wrecking the thing that badly, I guess I’ll just go with that.

    Is this the same reason why moving a WP installation is such a trial-and-error chore?

    Well, not really – most of the problems with moving wp from one server to another are related to the differences between host setups.

    If you want to do direct db input, you need to make several good backup dumps first. That way you’ll be more or less safe to tweak. I always recopy a db backup BEFORE I start messing with it. Some dbs on my servers right now I’ve got 20 backups of…. I’m the queen of redundancy….

    I have a tutorial about moving a few posts (in the guide examplified by moving ONE):
    If you want, take a look at it, but don’t blame me if anything goes wrong 🙂

    Moshu, that looks very helpful, and hopefully as I build more sites I will have a chance to try it out. For now, I’m a little too time-pressed to learn anything new, but I’ll keep it in mind.

    Well, I did what VK said and had my assistant move the posts manually. Didn’t take her more than an hour total for about a dozen or so posts, and without any headaches, so I guess you guys were right.

    You can see the result here: UpMarket SEO:

    Not having headaches is the best result. Glad you’ve got it done.

    Happy holidays!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Inserting posts via MySQL editing’ is closed to new replies.