• I’m assuming that if I have 5 websites then I need 5 databases, one for each website?

    If so, I have accidentally assigned the same database to 2 websites and strange things happen, including not being able to login to one site to create a duplicator package so I can re-install the package.

    How can I remove and re-assign a new database to each site?

    Thanks

Viewing 10 replies - 1 through 10 (of 10 total)
  • You can change the database info in wp-config.php file. this file connects to the database.

    Thread Starter cr4u

    (@cr4u)

    Thanks really appreciate your help but the link will not work, having a really bad day nothing is working!

    I’m assuming that if I have 5 websites then I need 5 databases, one for each website?

    No. You can use a single database. You just need to use a different table prefix for each site. In fact WordPress will not allow you to to install a second site with the same table prefix in a pre-populated database.

    Thanks really appreciate your help but the link will not work, having a really bad day nothing is working!

    You need to edit wp-config.php using a editor in wordpress install you want to change database.

    Thread Starter cr4u

    (@cr4u)

    I’m more confused about using the one database. It was all OK until I changed hosting and screwed it up when I installed the second site using duplicator plug in and assigned the same database as the first site.
    Previously I had 4 ad-on domains and had assigned a separate database to each site and that worked OK.
    When I click on various bits of site 1 it brings up bits of site 2 and vice versa, a bit embarrassing!
    I’m not confident enough to make database changes/edit the file without clear instructions. Tried both links sent and even copy/pasted in to my browser but wont work.
    Thanks everyone for your patience.

    You did not mention that you:

    a) changed hosts
    and
    b) used a duplicator plugin.

    Do you still have the database backup from the previous hosts?

    Thread Starter cr4u

    (@cr4u)

    Sorry, thought because I was successful installing site 1 and it WAS working OK for a day, might be able to recover it. Site 2 is no problem as I have only just done it and can re run the duplicator package again.
    If there was a go back button I would be OK!
    I still have the duplicator package for site 1 so could use that again (just lose todays work)

    Given the problems you have now, I’m not sure you should try re-using that plugin.

    Thread Starter cr4u

    (@cr4u)

    I backed up the previous site using FULL backup which I thought would be bullet proof, only to find it cannot be restored within cPanel for some reason. Duplicator seems much easier and reliable.

    Thread Starter cr4u

    (@cr4u)

    If I used the duplicator again, it would work OK but I would have to completely wipe out the sites and re-install in to empty folders

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to delete database and assign new’ is closed to new replies.