• I have built a new site for a client on a simple justhost account. I actually designed a complete replica of their existing site only I used a new theme (not template). The old site was running a much older version of wordpress.

    Here is my (major) problem: The old site used a highly customized cart, membership manamgement system and Learning Management system. The old site also has many custom member-based fields, and about 25,000 members.

    The site owners don’t want to change their cart, and want to retain their members. I was able to successfully export all posts from the old site and import via the native import/export tool. I then exported a complete SQL file at phpMyAdmin and imported it into the new site’s phpMyAdmin. So, in the new site, I can see the database that was created with the new WP install and design as well as the imported (old) WP database. I manually moved all plugins related to the cart, membership, etc.

    So, how do I go about telling my new WP build to use both my newly created database (the one in which I created the new site with the new theme) and the old database (for the plugins, getting all the users to show up, etc.) I guess, I need to tell WP to use the new database for some things and the old one for some things – and keep them both for when wordpress needs to query them.

    Currently, the new wordpress install can’t see the database…so is there a way to merge them into a hybrid – or dual database scenario? It would be easy if it were just a template change on the old site, but I have built a completely different site, different pages and different theme. I just need to keep the old plugin info/members/products/etc in the old database and get my new install to “see” them.

    I know this is a more advanced question…but i have seen it done before. Just not by me ?? Thank you all so much in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The old site was running a much older version of wordpress.

    That could mean its database is not (its tables are not) presently (or not yet) compatible with the newer WordPress installation.

    The old site used a highly customized cart, membership management system and Learning Management system. The old site also has many custom member-based fields, and about 25,000 members.

    It might be possible to copy those specific tables into use within the new database after the old database has been proved compatible with the latest WordPress.

    I can see the database that was created with the new WP install and design as well as the imported (old) WP database. I manually moved all plugins related to the cart, membership, etc.

    If you have activated those plugins, the goal would be to replace their tables with their tables from the old database after first being certain the old database is compatible with the newer WordPress installation.

    I guess, I need to tell WP to use the new database for some things and the old one for some things – and keep them both for when wordpress needs to query them.

    As logical as that might sound, I doubt that would ever be possible without doing a lot of tricky coding.

    Before trying anything at all, be absolutely certain you have complete database backups available. At that point, I would methodically update the old site’s WordPress and then copy its database to the new installation and then add the new theme, but you *might* be successful in just copying the necessary tables from the old database into the new.

    Thread Starter benjamin007

    (@benjamin007)

    Thank you so much for your reply! I really appreciate your time. A couple of what-if’s though…what if (a) I can’t update the current site’s WP because it is already known that an update would “break” stuff (a lot of customized code in there, and no child theme). This, according to the original developer of the customization. So, in essence, the old site hasn’t been updated in years because if that. I know, right?

    The old site is fully operational, and *if things do not go as planned with the new site, they will just continue to use the old one (bad idea for a number of reasons).

    You mentioned copying over tables as another option. I understand the concept there, but how would I do this…I am not very proficient on working with databases…and the old database (the one I am trying to merge in) is about 268MB in size…difficult to work with. Ridiculously huge.

    You definitely have quite a project there, and you definitely need to be working with local installations on your own machine rather than with any live site. After getting an exact copy of the old site running locally, I would deactivate all plugins and then begin the methodical (incremental, as required) WordPress update for the sole purpose of getting the database updated to compatibility with the latest WordPress…and I would be doing some database cleanup to likely reduce its size significantly along the way.

    The old site is fully operational, and *if things do not go as planned with the new site, they will just continue to use the old one (bad idea for a number of reasons).

    That sounds to me like someone is not going to want to pay for all the extra work required for the updating, but hopefully I am wrong about that.

    You mentioned copying over tables as another option. I understand the concept there, but how would I do this…

    That option has a greater chance of failure than updating the old and simply adding your new theme, but phpMyAdmin has the ability to rename imported tables. So, I have occasionally deleted a table and then imported one into its place and then renamed it to match the table name WordPress is expecting.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Merging two databases for one site’ is closed to new replies.