• I have a blog which currently has around 4 years worth of entries. I’ve backed up the current database and downloaded it to my computer. What I want to do it connect my wordpress site to a new database and basically start over without having to do a clean install of WP

    I set up a new DB and user and then edited my wp-config file but it wouldn’t work. When I refreshed my site it said something about too many connections – I honestly don’t know. So I edited the info back to what it was before

    So what I wanna know is, is this possible to do and if so how do I do it? I’ve been trawling the internet for a couple of days now and couldn’t find anything about it

    Thanks in advance (:

Viewing 6 replies - 1 through 6 (of 6 total)
  • When you say that you’ve created a new database and edited the wp-config file to match, do you mean that the database is completely empty? No tables, etc.?

    Thread Starter overthinker85

    (@overthinker85)

    pretty much yeah. I’ve been out of the design/code loop for long I’ve forgotten how to do everything

    Then the problem is that even though you have the WordPress files uploaded, it’s not actually installed on your database. You’ll need to run through the install process again I think by removing the wp-config file completely.

    You’ll loose all data (and possibility the media library’s connection to your images). All plugins will still be there, but they’ll need to be reactivated; and finally, every setting you saved before (including theme settings, wordpress settings, plugins settings, user accounts, etc.) will be gone.

    So in short, I’m sorry to say, I don’t think that there’s a away to do what you are looking for – unless someone can correct me one this.

    A long and hard alternative, would be to make a second copy of your original database. Open the copy with an editor and remove all the pages and data that you don’t want in your new database. Then save it and upload it to your database via phpmyadmin. The issue here is that a lot can go wrong.

    Thread Starter overthinker85

    (@overthinker85)

    if I’ve downloaded my database, I’ve just realised I could just ‘dump’ all posts and start over without losing anything like themes, plugins etc. If I ever want to put all my entries back then i just have to import the database and they’ll all come back.

    easiest option for me, am I right?

    If it works without any hiccups, yes, but like a said, there are actually a lot of things that could go wrong. On the plus side, if it doesn’t work correctly, you’ll know straight away that it’s a database issue 🙂

    It’s certainly worth a try.

    Thread Starter overthinker85

    (@overthinker85)

    I’ll try that then. Thanks for the help

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘change database connection’ is closed to new replies.