Transfer Settings & Data from Existing Cookie Solutions
Pre-Migration Assessment
Step 1: Analyze Current Setup
`
SLOS → Migration → Assessment → Run Analysis
`
Current Plugin Inventory:
`php
// Check installed consent plugins
$consent_plugins = [
‘cookie-notice’ => ispluginactive(‘cookie-notice/cookie-notice.php’),
‘gdpr-cookie-consent’ => ispluginactive(‘gdpr-cookie-consent/gdpr-cookie-consent.php’),
‘cookiebot’ => ispluginactive(‘cookiebot/cookiebot.php’),
‘complianz’ => ispluginactive(‘complianz-gdpr/complianz-gdpr.php’),
‘cookie-law-info’ => ispluginactive(‘cookie-law-info/cookie-law-info.php’),
‘termly’ => ispluginactive(‘termly/terms-and-conditions-popup.php’),
‘ iubenda’ => ispluginactive(‘iubenda-cookie-solution/iubenda-cookie-solution.php’)
];
$activeplugins = arrayfilter($consent_plugins, function($active) {
return $active;
});
`
Step 2: Data Export Preparation
Cookie Settings Export:
`php
// Export current cookie settings
function exportcookiesettings() {
global $wpdb;
$settings = [];
// Cookie Notice settings
if (ispluginactive(‘cookie-notice/cookie-notice.php’)) {
$settings[‘cookienotice’] = getoption(‘cookienoticeoptions’);
}
// GDPR Cookie Consent settings
if (ispluginactive(‘gdpr-cookie-consent/gdpr-cookie-consent.php’)) {
$settings[‘gdprcookie’] = getoption(‘gdprcookieconsent_settings’);
}
// Complianz settings
if (ispluginactive(‘complianz-gdpr/complianz-gdpr.php’)) {
$settings[‘complianz’] = getoption(‘complianzoptions’);
}
return $settings;
}
`
User Consent Data Export:
`php
// Export existing consent records
function exportconsentdata() {
global $wpdb;
$consent_data = [];
// Cookie Notice consent logs
if ($wpdb->getvar(“SHOW TABLES LIKE ‘{$wpdb->prefix}cookienotice_log'”)) {
$consentdata[‘cookienoticelogs’] = $wpdb->getresults(
“SELECT * FROM {$wpdb->prefix}cookienoticelog”
);
}
// GDPR Cookie Consent data
if ($wpdb->getvar(“SHOW TABLES LIKE ‘{$wpdb->prefix}gdprcookieconsentlog'”)) {
$consentdata[‘gdprlogs’] = $wpdb->get_results(
“SELECT * FROM {$wpdb->prefix}gdprcookieconsent_log”
);
}
return $consent_data;
}
`
Create Migration Backup
Step 1: Full Site Backup
`bash
Create complete backup before migration
wp db export pre-migration-backup.sql
tar -czf pre-migration-files.tar.gz wp-content/
`
Step 2: Plugin-Specific Backups
`php
// Backup plugin-specific data
function createmigrationbackup() {
$backupdir = WPCONTENT_DIR . ‘/migration-backups/’ . date(‘Y-m-d-H-i-s’);
wpmkdirp($backup_dir);
// Backup settings
$settingsbackup = $backupdir . ‘/settings.json’;
fileputcontents($settingsbackup, jsonencode(exportcookiesettings()));
// Backup consent data
$consentbackup = $backupdir . ‘/consent-data.json’;
fileputcontents($consentbackup, jsonencode(exportconsentdata()));
// Backup customizations
$custombackup = $backupdir . ‘/customizations.json’;
fileputcontents($custombackup, jsonencode(export_customizations()));
return $backup_dir;
}
`
Install Shahi LegalFlowSuite
Step 1: Plugin Installation
`
WordPress Admin → Plugins → Add New
Search: “Shahi LegalFlowSuite”
Install and activate
`
Step 2: Initial Configuration
`
SLOS → Setup Wizard → Run Setup
`
Basic Setup:
- Select compliance regions
- Choose banner style
- Configure essential settings
- Set up admin access
- Cookie Notice
- GDPR Cookie Consent
- Cookiebot
- Complianz
- Cookie Law Info
- Termly
- iubenda
- [ ] Banner appears correctly
- [ ] All buttons work
- [ ] Consent saves properly
- [ ] Categories display accurately
- [ ] Cookies set based on consent
- [ ] Analytics tracking works with consent
- [ ] Marketing pixels fire with consent
- [ ] Cookie blocking functions
- [ ] Consent history imported
- [ ] User preferences preserved
- [ ] Settings migrated correctly
- [ ] Customizations applied
- Migration troubleshooting guide
- Plugin comparison matrix
- Data mapping reference
- Rollback procedures
- Technical support team
- Migration specialists
- Plugin compatibility experts
- Data recovery services
- User forums
- Migration case studies
- Best practices guides
- Video tutorials
- Consent data migration accuracy (>99%)
- User consent preservation rate (>95%)
- System performance maintained (±10%)
- User complaints (<5% increase)
- Support tickets (<10% increase)
- Compliance maintained
- User experience improved
- Administrative burden reduced
- Feature adoption increased
- Support costs decreased
Run Migration Wizard
Step 1: Access Migration Tool
`
SLOS → Migration → Import Data → Start Migration
`
Step 2: Select Source Plugin
Supported Plugins:
Migration Selection:
`javascript
const migrationOptions = {
sourceplugin: ‘cookienotice’, // or ‘gdprcookieconsent’, ‘complianz’, etc.
import_settings: true,
importconsentdata: true,
import_customizations: true,
preserveuserpreferences: true,
backupbeforemigration: true
};
`
Import Settings & Configuration
Step 1: Banner Settings Migration
Cookie Notice to SLOS:
`php
// Map Cookie Notice settings to SLOS
function migratecookienoticesettings($cnsettings) {
return [
‘bannerposition’ => $cnsettings[‘position’] === ‘top’ ? ‘top’ : ‘bottom’,
‘bannerstyle’ => $cnsettings[‘style’] === ‘block’ ? ‘block’ : ‘classic’,
‘acceptbuttontext’ => $cnsettings[‘buttontext’] ?: ‘Accept’,
‘rejectbuttontext’ => ‘Reject’,
‘readmoretext’ => $cnsettings[‘linktext’] ?: ‘Read More’,
‘readmorelink’ => $cnsettings[‘linkurl’] ?: ‘/privacy-policy’,
‘colors’ => [
‘background’ => $cn_settings[‘colors’][‘background’] ?: ‘#000000’,
‘text’ => $cn_settings[‘colors’][‘text’] ?: ‘#ffffff’,
‘buttons’ => $cn_settings[‘colors’][‘buttons’] ?: ‘#ffffff’
]
];
}
`
GDPR Cookie Consent to SLOS:
`php
// Map GDPR Cookie Consent settings
function migrategdprsettings($gdpr_settings) {
return [
‘cookie_categories’ => [
‘essential’ => [
‘enabled’ => true,
‘required’ => true,
‘description’ => $gdprsettings[‘necessarydescription’]
],
‘analytics’ => [
‘enabled’ => $gdprsettings[‘analyticsenabled’],
‘description’ => $gdprsettings[‘analyticsdescription’]
],
‘marketing’ => [
‘enabled’ => $gdprsettings[‘marketingenabled’],
‘description’ => $gdprsettings[‘marketingdescription’]
]
],
‘geotargeting’ => $gdprsettings[‘geotargetingenabled’],
‘consentexpiry’ => $gdprsettings[‘consentexpirydays’] ?: 365
];
}
`
Step 2: Cookie Category Mapping
Category Mapping Table:
`javascript
const categoryMapping = {
// Cookie Notice categories
‘cookie_notice’: {
‘necessary’: ‘essential’,
‘analytics’: ‘analytics’,
‘marketing’: ‘marketing’
},
// GDPR Cookie Consent categories
‘gdprcookieconsent’: {
‘necessary’: ‘essential’,
‘analytics’: ‘analytics’,
‘advertisement’: ‘marketing’,
‘functional’: ‘preferences’
},
// Complianz categories
‘complianz’: {
‘functional’: ‘essential’,
‘statistics’: ‘analytics’,
‘marketing’: ‘marketing’,
‘preferences’: ‘preferences’
},
// Cookiebot categories
‘cookiebot’: {
‘necessary’: ‘essential’,
‘preferences’: ‘preferences’,
‘statistics’: ‘analytics’,
‘marketing’: ‘marketing’
}
};
`
Import User Consent Data
Step 1: Consent History Migration
`php
// Import consent records
function importconsenthistory($sourcedata, $sourceplugin) {
global $wpdb;
$imported = 0;
$skipped = 0;
foreach ($source_data as $record) {
// Map source data to SLOS format
$slosrecord = mapconsentrecord($record, $sourceplugin);
// Validate record
if (validateconsentrecord($slos_record)) {
$wpdb->insert(
$wpdb->prefix . ‘slosconsentlog’,
$slos_record
);
$imported++;
} else {
$skipped++;
logskippedrecord($record, ‘validation_failed’);
}
}
return [‘imported’ => $imported, ‘skipped’ => $skipped];
}
`
Step 2: Consent Record Mapping
Cookie Notice Record Mapping:
`php
function mapcookienotice_record($record) {
return [
‘userid’ => $record->userid ?: 0,
‘ipaddress’ => $record->ipaddress,
‘useragent’ => $record->useragent,
‘consentcategories’ => jsonencode([
‘essential’ => true,
‘analytics’ => $record->analytics_accepted,
‘marketing’ => $record->marketing_accepted
]),
‘consenttimestamp’ => strtotime($record->consentdate),
‘consentexpiry’ => strtotime($record->consentdate) + (365 24 60 * 60),
‘source’ => ‘migratedfromcookie_notice’
];
}
`
GDPR Cookie Consent Record Mapping:
`php
function mapgdprrecord($record) {
return [
‘userid’ => $record->userid ?: 0,
‘ip_address’ => $record->ip,
‘useragent’ => $record->useragent,
‘consentcategories’ => jsonencode([
‘essential’ => true,
‘analytics’ => strpos($record->consent, ‘analytics’) !== false,
‘marketing’ => strpos($record->consent, ‘marketing’) !== false,
‘preferences’ => strpos($record->consent, ‘functional’) !== false
]),
‘consenttimestamp’ => strtotime($record->consentdate),
‘consentexpiry’ => strtotime($record->consentdate) + ($record->expiry_days 24 60 * 60),
‘source’ => ‘migratedfromgdprcookieconsent’
];
}
`
Handle Customizations & Integrations
Step 1: Custom CSS Migration
`php
// Migrate custom CSS
function migratecustomcss($source_plugin) {
$custom_css = ”;
switch ($source_plugin) {
case ‘cookie_notice’:
$settings = getoption(‘cookienotice_options’);
if (!empty($settings[‘css’])) {
$custom_css = $settings[‘css’];
}
break;
case ‘gdprcookieconsent’:
$settings = getoption(‘gdprcookieconsentsettings’);
if (!empty($settings[‘custom_css’])) {
$customcss = $settings[‘customcss’];
}
break;
case ‘complianz’:
$settings = getoption(‘complianzoptions’);
if (!empty($settings[‘custom_css’])) {
$customcss = $settings[‘customcss’];
}
break;
}
// Convert CSS to SLOS format
$sloscss = convertcsstoslos($customcss, $sourceplugin);
// Save to SLOS
updateoption(‘sloscustomcss’, $sloscss);
return $slos_css;
}
`
Step 2: Integration Migration
Google Analytics Integration:
`php
function migrategaintegration($source_plugin) {
$ga_settings = [];
switch ($source_plugin) {
case ‘cookie_notice’:
$gasettings = getoption(‘cookienoticega_settings’);
break;
case ‘gdprcookieconsent’:
$gasettings = getoption(‘gdprgasettings’);
break;
case ‘cookiebot’:
$gasettings = getoption(‘cookiebotgasettings’);
break;
}
// Configure SLOS GA integration
if (!empty($gasettings[‘trackingid’])) {
updateoption(‘slosgatrackingid’, $gasettings[‘trackingid’]);
updateoption(‘slosgaanonymizeip’, $gasettings[‘anonymizeip’]);
}
}
`
Facebook Pixel Integration:
`php
function migratefacebookpixel($source_plugin) {
$fb_settings = [];
switch ($source_plugin) {
case ‘gdprcookieconsent’:
$fbsettings = getoption(‘gdprfacebooksettings’);
break;
case ‘cookiebot’:
$fbsettings = getoption(‘cookiebotfacebooksettings’);
break;
}
// Configure SLOS Facebook integration
if (!empty($fbsettings[‘pixelid’])) {
updateoption(‘slosfacebookpixelid’, $fbsettings[‘pixelid’]);
}
}
`
Test Migration Results
Step 1: Functionality Testing
Banner Testing:
Cookie Testing:
Data Testing:
Step 2: Consent Validation
`javascript
// Validate migrated consent data
function validatemigratedconsent() {
const validation = {
total_records: getTotalConsentRecords(),
valid_records: 0,
invalid_records: 0,
categories_mapped: 0,
issues: []
};
// Check each record
getAllConsentRecords().forEach(record => {
if (validateConsentRecord(record)) {
validation.valid_records++;
if (record.categories_mapped) {
validation.categories_mapped++;
}
} else {
validation.invalid_records++;
validation.issues.push({
record_id: record.id,
issue: getValidationError(record)
});
}
});
return validation;
}
`
Handle Migration Issues
Step 1: Common Problems & Solutions
Missing Consent Data:
`php
// Repair missing consent data
function repairmissingconsent() {
global $wpdb;
// Find records with missing categories
$missingrecords = $wpdb->getresults(“
SELECT * FROM {$wpdb->prefix}slosconsentlog
WHERE consentcategories IS NULL OR consentcategories = ”
“);
foreach ($missing_records as $record) {
// Apply default consent based on migration source
$defaultconsent = getdefaultconsentfor_source($record->source);
$wpdb->update(
$wpdb->prefix . ‘slosconsentlog’,
[‘consentcategories’ => jsonencode($default_consent)],
[‘id’ => $record->id]
);
}
}
`
Broken Customizations:
`php
// Fix broken custom CSS
function fixbrokencss() {
$currentcss = getoption(‘sloscustomcss’);
$fixed_css = ”;
// Remove incompatible selectors
$fixedcss = pregreplace(‘/\.cookie-notice-container/’, ‘.slos-consent-banner’, $current_css);
$fixedcss = pregreplace(‘/\.gdpr-cookie-consent/’, ‘.slos-consent-banner’, $fixed_css);
// Update incompatible properties
$fixedcss = strreplace(‘float:’, ‘position:’, $fixed_css);
updateoption(‘sloscustomcss’, $fixedcss);
}
`
Integration Failures:
`php
// Fix broken integrations
function fixbrokenintegrations() {
// Reconfigure Google Analytics
if (getoption(‘slosgatrackingid’)) {
// Verify GA settings
$gasettings = verifyga_settings();
if (!$ga_settings[‘valid’]) {
// Reconfigure GA integration
reconfiguregaintegration();
}
}
// Reconfigure Facebook Pixel
if (getoption(‘slosfacebookpixelid’)) {
$fbsettings = verifyfacebook_settings();
if (!$fb_settings[‘valid’]) {
reconfigurefacebookintegration();
}
}
}
`
Post-Migration Cleanup
Step 1: Remove Old Plugins
`php
// Safely deactivate old plugins
function cleanupoldplugins() {
$pluginstoremove = [
‘cookie-notice/cookie-notice.php’,
‘gdpr-cookie-consent/gdpr-cookie-consent.php’,
‘complianz-gdpr/complianz-gdpr.php’,
‘cookie-law-info/cookie-law-info.php’
];
foreach ($pluginstoremove as $plugin) {
if (ispluginactive($plugin)) {
deactivate_plugins($plugin);
logplugindeactivation($plugin);
}
}
}
`
Step 2: Database Cleanup
`php
// Clean up old database tables
function cleanupoldtables() {
global $wpdb;
$tablestodrop = [
$wpdb->prefix . ‘cookienoticelog’,
$wpdb->prefix . ‘gdprcookieconsent_log’,
$wpdb->prefix . ‘complianz_cookies’,
$wpdb->prefix . ‘cookielawinfo_log’
];
foreach ($tablestodrop as $table) {
if ($wpdb->get_var(“SHOW TABLES LIKE ‘$table'”)) {
$wpdb->query(“DROP TABLE $table”);
logtabledropped($table);
}
}
}
`
Monitor Migration Success
Step 1: Performance Monitoring
`php
// Monitor post-migration performance
function monitormigrationperformance() {
$metrics = [
‘consentsavetime’ => measureconsentsave_time(),
‘bannerloadtime’ => measurebannerload_time(),
‘cookieblockingefficiency’ => measurecookieblocking(),
‘usercomplaints’ => countuser_complaints()
];
// Compare with pre-migration benchmarks
$comparison = comparewithbaselines($metrics);
if ($comparison[‘degraded’]) {
sendperformancealert($comparison);
}
return $metrics;
}
`
Step 2: User Feedback Collection
`javascript
// Collect user feedback on migration
function collectmigrationfeedback() {
// Add feedback form to banner
const feedbackForm = `
How was your experience with the new consent system?
`;
// Display feedback form
showMigrationFeedback(feedbackForm);
}
`
Rollback Procedures
Step 1: Emergency Rollback
`php
// Emergency rollback function
function emergency_rollback() {
// Deactivate SLOS
deactivate_plugins(‘shahi-legalflowsuite/shahi-legalflowsuite.php’);
// Restore backup
$backupdir = getlatest_backup();
if ($backup_dir) {
restorefrombackup($backup_dir);
}
// Reactivate original plugin
$originalplugin = getoriginal_plugin();
activateplugin($originalplugin);
// Log rollback
logemergencyrollback();
}
`
Step 2: Gradual Rollback
`php
// Gradual rollback with data preservation
function gradual_rollback() {
// Keep SLOS data but hide interface
updateoption(‘slosrollback_mode’, true);
// Restore original plugin interface
restoreoriginalinterface();
// Maintain dual consent systems temporarily
enabledualconsent_mode();
// Schedule complete rollback
wpschedulesingleevent(time() + 86400, ‘completerollback’); // 24 hours
}
`
Migration Support Resources
Documentation Links
Support Contacts
Community Resources
Success Metrics
Migration KPIs
Long-term Success
Share this article
Still need help?
Our support team is ready to assist you with personalized guidance for your workspace.