Support » Fixing WordPress » Duplicate MySQL on local testing server

  • The WordPress site is up and running on the web and just installed a local testing server (Apache/php/mysql) on my home computer. I’d like to suplicate the articles, categories, and pages from the web site database to the local testing server database.

    When the site’s (on the web) MySQL is exported, then imported into the MySQL on the testing server access to WP-ADMIN gets fouled up. When WP-ADMIN is accessed on the testing server it jumps to the web site’s administrative area.

    I’ve tried exporting/importing all of the tables except for the options table, but MySQL errors occur.

    What is the trick to importing the articles posted on the web to the local testing server without fouling up access to the administrative area?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    SITEURL and HOME. Define those two in the wp-config.php file for your local site to override the database settings.


    Hi Otto42,

    Thank you for the incredibly fast response.

    Hi again,

    Added to the config file:


    Exported the web site’s database and imported to the local testing server’s database.

    When accessing the local testing server the browser is redirected to the site hosted on the web. Same when accessing WP-Admin.

    The approach to define the SITEURL and HOME in the config file makes sense.

    What can be done to override the redirect to the website?

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Whoops, wrong defines. That should be WP_SITEURL and WP_HOME. My bad.

    And that will stop the redirect for you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Duplicate MySQL on local testing server’ is closed to new replies.