How to back up or migrate affiliate data

The best way to back up or migrate affiliate data is to export and import your MySQL database directly via phpMyAdmin or similar as shown in this WordPress codex article: Moving WordPress.

You can also use several different plugins that allow you to back up affiliate data:


When doing a MySQL dump of your database, you may run into the following error: #1227 - Access denied; you need (at least one of) the SUPER privilege(s) for this operation
Database error related to campaigns

To resolve the error, you can simply back up everything except the wp_affiliate_wp_campaigns table. The wp_affiliate_wp_campaigns table is not an actual table, it is a “view”. If you skip exporting the wp_affliate_wp_campaigns view, the problem should go away. Since the campaigns view is created automatically from the referrals / visits table, you do not need to include that in your backups. The campaigns view will automatically reflect the changes that happen in the referrals / visits tables.