WordPress.org

Ready to get started?Download WordPress

Forums

Pointing to a different database (6 posts)

  1. valuxes
    Member
    Posted 5 years ago #

    I have a "PROD" WP site with its PROD_DB.

    I created a separate "DEV" site with its own DEV_DB.

    I want to point my DEV site to PROD_DB to see how it looks with real data (other option is to export and import the data). Is this possible? I changed my DEV wp_config.php to point to PROD_DB but nothing displays.

  2. whooami
    Member
    Posted 5 years ago #

    I changed my DEV wp_config.php to point to PROD_DB but nothing displays.

    thats how its done.

    are the 2 pair of urls the same?

    http://www.tamba2.org.uk/wordpress/site-url/

  3. valuxes
    Member
    Posted 5 years ago #

    PROD points to:

    http://www.example.com

    and DEV points to:

    http://www.example.com/dev

    Going thru your tutorial about changing the site_url and home values: in my case, PROD has http://www.example.com for both values and DEV has http://www.example.com/dev for both values.

    Would I need do change the DEV site_url and home to http://www.example.com ?

    Not sure I understand, but what do these two parameters have to do with accessing the database?

    Thanks for any help!

  4. whooami
    Member
    Posted 5 years ago #

    becauae this:

    I changed my DEV wp_config.php to point to PROD_DB but nothing displays.

    tells us that there isnt a databse connection issue

    WordPress give well known error messages when it doesnt properly connect to the database.

  5. valuxes
    Member
    Posted 5 years ago #

    Hi whooami,

    makes sense.

    OK, trying to understand further: if there is no DB connection issue, why should I be required to change the site_url and home links?

    To recap, my DEV WP works with DEV_DB but not when I change DEV config.php to point to PROD_DB. My DEV site_url and home links remain the same (because I am still running my.example.com/dev), I only changed where my DB is pointing to.

    I am most puzzled.

  6. squeeky
    Member
    Posted 5 years ago #

    please excuse this "shot in the dark" (as i'm not too smart) - could there be some interference with the cache ?

Topic Closed

This topic has been closed to new replies.

About this Topic