This page describes how to move a configured installation of Participants Database from one site to another. This is something you might do if you’re developing a site using a test or staging site, or if you need to duplicate the plugin setup on one site to another site.
How the Plugin Stores Its Confguration
The plugin stores its configuration in two tables in the main WordPress database and also in an entry in the WordPress options table.
To migrate the confgured plugin, we need to copy those three things from the source site to the new site.
To interact with the database directly, we need to use a utility named phpMyAdmin. (this is the most widely available one, there are other applications that do the same thing) This utility is commonly available in your hosting control panel.
Copying the Confguration Database
If you are unfamiliar with phpMyAdmin, this may be a little challenging to navigate, I’ll try to be as specifically descriptive as possble here.
The first thing you need to do when you open the application is select the database. This will be the main database that WordPress uses, and is the database named in the wp-config.php script.
If there are several possibilities and you don’t know which one to choose, open the wp-config.php file and look for the assignment for the DB_NAME gobal…looks something like this:
Select your database, and then you will see a page with all the tables in the database. If you don’t see that, click on the “Structure” tab to show all the tables.
The database tables we need to copy are named:
The “wp_” table prefix may be different on your setup, but the rest of the name will be the same.
Select those tables in the list, like this:
At the bottom of the list of tables, find the “With Selected:” selector, click that and select “Export.” You’ll see a dialog where you can choose the export format. If there is a “Quick” selection, just use that. Otherwise, you can do an SQL export with the default parameters. No need to go down the rabbit-hole on all those options unless you actually know what they all do.
Go ahead and download the SQL file.
Copying the Plugin Options
Going back to the “Structure” tab, find the WordPress options table “wp_options.” Click on the name of that table to browse its contents. On the page that opens, click the “Browse” tab if it is not selected already.
You’re looking for an option named “paticipants-database_options” if you don’t see it, you can use the “search” tab to find it in the “option_name” column.
Once you’re viewing that row, select and copy the contents of the “option_value” column. Make sure you are copying the whole contents.
You probably want to paste this into a blank plain text file if you want to make sure you don’t lose it out of the clipboard. Save the file as a backup of your settings.
Migrating the Configuration to the New Database
Now open the new database in phpMyAdmin. This operation will completely replace the fields and field groups confugration in this site, don’t expect it to “merge” the incoming fields with the fields you may have configured in the new install.
On the main database page, click on the “Import” tab. At the top of that window, select the SQL file you exported from the source site.
Don’t worry about any of the options here (again, unless you know what they do) just go to the bottom of the window and click on “GO” to import the data. When that is complete, the fields and groups will be copied to the new install.
Copying the Options
Next, click on the wp_options table. Once again, find the “participants-database_options” row. Copy the settings string you got from the source install and paste it into the “option_value” column of the row. Be sure to completely replace the contents of the row value with the copied configuration string.
At this point, all the plugin’s confguration data is copied to the new site.