• I am looking at changing the theme on my site, but it needs substantial work and changes before it will replace the current theme. The idea is to install a new wp instance under yourdomain.com/newtheme and copy the data from the current site to the “newtheme” instance.

    The question is if I can use the same database when installing the new instance/theme as in the current site – and thereby populate all the data into the new theme?

    What if I do any changes in the new theme (create new pages, insert new data etc) – would it impact the database and thereby the current site?

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can use the same database but you will need to re-install WordPress at the new location using db tables with a different prefix to the old site. You may also wish to review Moving_WordPress.

    Thread Starter cloudcomputingtopics

    (@cloudcomputingtopics)

    I installed wp at a new location copying the same wp-config.php as in the main (current) site, except for editing/changing $table_prefix

    WP installed without asking for any db details (assuming it used the details already in the wp-config.php file (with the main db details already there).

    However, going to the new site (subsite) if appears blank, no posts are visible from the old site (although using the same db). Did I miss something?

    Thread Starter cloudcomputingtopics

    (@cloudcomputingtopics)

    It seems the new install (installed in the subdirectory of a main install, yourdomain.com/newinstance) created a new set of tables in the same db (as the main site).

    The new tables have the new prefix set in the wp-config.php file ($table_prefix). Therefore, I assume, there is no data in the tables – it’s a new table set.

    I probably want to use the same tables (populate the data) in the new instance as in the current main instance. Would that be possible by just changing $table_prefix to the same (wp_) as in the main instance?

    No. You now have two sites that are, effectively, independent of one another.

    Thread Starter cloudcomputingtopics

    (@cloudcomputingtopics)

    So how can I install a new instance that uses the same set of tables as the main site (populates the same data)?

    Thread Starter cloudcomputingtopics

    (@cloudcomputingtopics)

    Yes, but I am not going to move the domain name for now. I just want to create a copy of the current production site under a subdirectory (with the same data).

    I then want to work on the new instance (change theme etc.) for a while and, when ready, direct/dorward the current domain to the subdirectory (with the new instance)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Install new instance on old database?’ is closed to new replies.