• Ok here’s my problem. It probably has a very simple answer – but… I’m new to all this!

    1. I create a database eg “testdatabase” using MyPHPAdmin

    2. I install a WP site for testing off my main directory eg, “www.mysite.com/tests/newsite”

    3. Once I’m happy with the way it looks I want to take it OUT of my test area and put the site somewhere useful for my client eg, “www.myclient.com” using THE SAME DATABASE so that I don’t have to delete the database and recreate it.

    BUT, if I delete the ‘test’ site and try to re-install the WP site to a new location I get an error saying something like ‘this database is already in use” (or something like that, I can’t remember exactly the words)

    Is there a nice, quick, simple way to relocate the test site to a new location using the same database

    NOTE the database is based at the same location as the test site and the new location (ie I am using a virtual server for both testing and for clients… if that helps)

    Cheers,

    N

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dan Bissonnet

    (@asinglehumanbeing)

    Instead of deleting and re-installing the the test site, it’s probably better to just move the files out of the sub-folder and into the domain root.

    You may need to update your wp-config.php file by adding:

    define('WP_SITEURL', 'https://www.myclient.com');
    define('WP_HOME',  'https://www.myclient.com');

    after the database connection details. This tells WordPress that the site has moved location. The database details should stay the same.

    Thread Starter namword

    (@namword)

    Ok thanks ‘asinglehumanbeing’ lol

    I’ll try that and see what happens. To be honest I’ve never messed about with the wp-config.php file before, so this will be a new one on me!

    Cheers,

    N

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘One database, one test site, one live site!’ is closed to new replies.