• Resolved misterpatrick67

    (@misterpatrick67)


    Hello all,

    I m wondering what the easiest way to duplicate a site would be? Let’s say I have a site at http://www.mysite.com and would like to run the same site at http://www.mysite.com/test. I want both to run simultaneously and they can have independent databases but I want to duplicate to have the same category and post ID’s. I’m running some A/B tests of themes which is why I need duplicate sites running and my theme is dependent on category ID’s.

    I’m fine working with queries and changing tables in MySQL but am not sure which commands to use when exporting tables. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Install 2nd site first.

    Then at 1st site do Tools->Export.

    Then at 2nd site do Tools->Import->WordPress.

    Thread Starter misterpatrick67

    (@misterpatrick67)

    Thanks. I actually find a great way to do it. Using myPhpAdmin I export all tables except wp_options. I also check the ‘Add DROP TABLE’ and ‘Add CREATE PROCEDURE / FUNCTION / EVENT’ boxes under Structure. I run copy the site, delete the wp_config.php file and proceed to install the site. I log in, activate the correct theme and all the relevant plugins. Then, I log in using myPhpAdmin, import the database I exported. This will log my out of the WP site as I’ve also overwritten the wp_users table, but I can log back in using my original user name. Everything should work fine.

    The trick is to not export the wp-options table.

    My biggest problem I’ve had in the past with doing a simple WP Export and Import is that the mapping of ID codes doesn’t always work quite right and my themes depend of specific ID’s for some posts and categories.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Duplicating a database.’ is closed to new replies.