Posted on by

How to Copy Participants Database to Another Site

Sometimes, you want to duplicate a configured installation of Participants Database to another site or server. It can be done, it’s a bit complicated, and you’ll need to be familiar with database tools such as phpMyAdmin.

Start by installing the plugin in the new location. Activate it to set up the initial database entries, then deactivate it so that it won’t try to run while you’re copying things.

Then, open phpMyAdmin (or whatever database tool you prefer) on the database of the first (original) install. For those new to this, you can usually do this by going to your hosting control panel and finding the launch button for phpMyAdmin. It’s also possible to install a WP plugin that will give you direct access to the database.

Absolutely only do this with a full backup of your databases handy in case of disaster so you can put things back the way they were.

The plugin uses 3 database tables, you need to copy all three. Export the three tables as an SQL (they all have “participants_database” in their names, they won’t be hard to find), then import them to the new database, overwriting the tables the plugin installed there. If you don’t know how to do this, you’ll need to seek out a tutorial that explains how to export an SQL for selected tables. Make sure the exported file is set up to overwrite the tables on the receiving end.

If you want to clear out the stored records from the original install, you need to do a TRUNCATE on the main plugin table, wp_participants_database, after you copy the tables to your new location. A “truncate” removes all records, leaving the structure of the table intact, and resets the counter so new records will begin with an ID of 1.

Now you need to copy the settings. You have to do this by opening the database (you already have it open from doing the copy above) in your first install, go to the wp_options table, then find an entry with an option name of “participants-database_options” Do the same on the new location, then copy the value from the original install to the new install.

I never set it up to make it easy…

2 thoughts on “How to Copy Participants Database to Another Site

  1. Hi Roland
    Hosting guys forced a fresh install WP from their side.
    PDB all 3 database files intact from PhPAdmin side. Installed PDB plugin fine, but it is not listing current participants / database fields i.e. link to the existing database not intact.
    wp_options has no line as described above. Where should I be looking to re-create the link?

    1. If the 3 tables the plugin uses are in the same database, then it should read them, there’s no setting to connect them, WordPress does that. Were the names changed? Participants Database expects the the tables to have specific names following the prefix. For instance if your prefix is wp_ (the default) the table should be named:

      wp_participants_database
      wp_paticipants_database_fields
      wp_participants_database_groups

      The prefix should be the same for all tables in the database

Leave a Reply
You have to agree to the comment policy.

2 thoughts on “How to Copy Participants Database to Another Site

  1. Hi Roland
    Hosting guys forced a fresh install WP from their side.
    PDB all 3 database files intact from PhPAdmin side. Installed PDB plugin fine, but it is not listing current participants / database fields i.e. link to the existing database not intact.
    wp_options has no line as described above. Where should I be looking to re-create the link?

    1. If the 3 tables the plugin uses are in the same database, then it should read them, there’s no setting to connect them, WordPress does that. Were the names changed? Participants Database expects the the tables to have specific names following the prefix. For instance if your prefix is wp_ (the default) the table should be named:

      wp_participants_database
      wp_paticipants_database_fields
      wp_participants_database_groups

      The prefix should be the same for all tables in the database

Leave a Reply
You have to agree to the comment policy.