Configuration backup and migration are essential for maintaining your cookie consent setup across environments, protecting against data loss, and streamlining multi-site deployments. DigiConsent’s import/export functionality allows you to save your entire consent configuration as a portable file that can be restored on the same site or transferred to different WordPress installations. This capability is invaluable for agencies managing multiple client sites, developers moving between staging and production environments, and website owners who want to safeguard their consent configuration.
This comprehensive guide covers everything about importing and exporting DigiConsent settings: when to use these features, how to create and restore backups, transferring configurations between sites, troubleshooting common issues, and implementing best practices for configuration management.
Understanding Import/Export Functionality
Import and export features allow you to save and restore your complete DigiConsent configuration as a data file.
What Gets Exported
When you export DigiConsent settings, the following configuration is typically included:
Banner Settings:
- Banner position (top, bottom, center)
- Banner layout and design settings
- Banner text (heading, description, button labels)
- Colors, transparency, and styling
- Logo configuration
- Animation settings
Cookie Categories:
- Category names and descriptions
- Category enable/disable status
- Scripts assigned to each category
- Cookie declarations and documentation
Consent Settings:
- Consent behavior (explicit vs. implied)
- Default consent states
- Consent expiration duration
- Auto-hide and reload settings
Integration Settings:
- Google Consent Mode configuration
- Privacy policy URL
- Regional settings if applicable
Advanced Settings:
- Script execution settings
- Preference center configuration
What Doesn’t Get Exported
Some data is typically not included in exports:
- User consent records: Individual user consent choices are not exported (privacy consideration)
- Analytics data: Consent statistics and analytics stay on the original site
- License keys: Plugin license information is not transferred
- Site-specific URLs: Some URL references may need updating after import
Export File Format
DigiConsent typically exports settings as a JSON (JavaScript Object Notation) file:
- Human-readable: You can open and view the file in a text editor
- Structured data: Configuration organized in a logical hierarchy
- Portable: Can be shared, backed up, or version controlled
- Standard format: JSON is widely supported and stable
Example export filename: digiconsent-settings-2025-01-15.json
Exporting Your Settings
Creating a backup of your configuration is straightforward and should be done regularly.
How to Export Settings
- Navigate to DigiConsent > Settings > Import/Export (or similar menu location)
- Click the Export Settings button
- DigiConsent generates a JSON file containing your configuration
- Your browser downloads the file (check your Downloads folder)
- Rename the file descriptively if needed (include date or site name)
- Save the file in a secure location
The export happens instantly—no processing or waiting required.
When to Export Settings
Create exports in these situations:
Before making major changes:
- Before redesigning your banner
- Before adding new tracking scripts
- Before changing consent behavior settings
- Provides a rollback point if changes don’t work as expected
Regular backups:
- Monthly or quarterly exports as part of site maintenance
- Protects against accidental configuration deletion
- Creates historical record of configuration changes
Before WordPress/plugin updates:
- Before updating DigiConsent plugin
- Before major WordPress version updates
- Safety measure in case updates cause issues
Site migration or duplication:
- Moving from staging to production
- Duplicating setup to a new site
- Creating templates for multiple client sites
Client handoff:
- When delivering a website to a client
- Provides documentation of consent setup
- Enables easy restoration if client accidentally changes settings
Importing Settings
Importing restores a previously exported configuration to your WordPress installation.
How to Import Settings
- Navigate to DigiConsent > Settings > Import/Export
- Find the Import Settings section
- Click Choose File or Upload File
- Select your DigiConsent JSON export file from your computer
- Click Import or Upload and Import
- DigiConsent processes the file and applies the configuration
- You’ll see a success message when import completes
- Review your settings to ensure everything imported correctly
- Clear browser cache and test the banner on your live site
Import Behavior
Understanding what happens during import helps you use the feature confidently:
Complete replacement:
- Importing typically replaces ALL current settings
- Your existing configuration is overwritten
- This ensures clean, consistent state
- Export current settings first if you want to preserve them
Selective import (if supported):
- Some implementations allow importing specific sections
- Import only banner design, only scripts, only categories, etc.
- Useful for transferring partial configurations
Post-Import Verification
After importing, verify everything works correctly:
- Check banner appearance: Visit your site and verify the banner displays correctly
- Review all settings: Go through each settings section to confirm proper import
- Test consent flow: Accept, reject, and customize consent to ensure functionality
- Verify scripts: Check that tracking scripts are properly assigned to categories
- Check URLs: Verify privacy policy links and other URLs are correct (may need updating)
- Test tracking: Confirm analytics and marketing pixels work after consent
- Mobile testing: Verify banner works on mobile devices
Use Cases for Import/Export
Import/export functionality serves several important purposes.
Staging to Production Migration
Develop and test consent configuration on staging before deploying to production:
- Configure DigiConsent on staging site
- Test thoroughly (different scenarios, devices, browsers)
- Refine until perfect
- Export settings from staging
- Import to production site
- Production instantly has tested, working configuration
This workflow prevents trial-and-error configuration on your live site where users can see mistakes.
Multi-Site Deployment
If you manage multiple similar websites (like client sites or franchise locations):
- Create perfect consent setup on one site
- Export the configuration
- Import to all other sites
- Make minor site-specific adjustments (URLs, branding) as needed
- All sites have consistent, professional consent implementation
This saves enormous time compared to configuring each site from scratch and ensures consistency.
Configuration Templates
Create reusable templates for different scenarios:
GDPR Template: Conservative settings for EU audience
- All consents default to denied
- 6-month expiration
- Google Consent Mode enabled
- Explicit consent required
E-commerce Template: Settings optimized for online stores
- Necessary cookies include cart functionality
- Analytics and marketing cookies configured for common e-commerce tools
- Facebook Pixel, Google Ads setup included
Blog Template: Simple setup for content sites
- Basic analytics only
- Minimal marketing tracking
- Clean, non-intrusive design
Save these templates and import the appropriate one when starting new projects.
Disaster Recovery
Protect against accidental deletion or corruption:
- Regular exports serve as backups
- If settings are accidentally deleted or misconfigured, import the last good backup
- Instant recovery instead of reconfiguring from scratch
- Particularly important for complex setups with many custom scripts
Version Control and Tracking
Maintain history of configuration changes:
- Export after major changes
- Name files with dates or version numbers
- Store in version control system (Git) if appropriate
- Roll back to previous configurations if needed
- Document what changed in each version
Example naming: digiconsent-v1.0-initial.json, digiconsent-v2.0-added-facebook-pixel.json
Best Practices for Import/Export
File Organization
Organize exported files systematically:
Naming convention:
- Include site name or identifier
- Include date in YYYY-MM-DD format for sortability
- Include version or description if relevant
- Example:
clientname-digiconsent-2025-01-15-gdpr-compliant.json
Storage location:
- Cloud storage (Google Drive, Dropbox) for accessibility and backup
- Version control repository for development projects
- Secure local folder with regular backups
- Don’t rely solely on downloads folder (easy to accidentally delete)
Regular Backup Schedule
Establish a routine backup schedule:
- After initial setup: Export once configuration is finalized
- Before changes: Export before modifying working configuration
- Monthly routine: Export first of each month as part of site maintenance
- After significant updates: Export after adding new tracking tools or changing consent flow
Documentation
Document your exports:
- Keep a changelog noting what’s in each export
- Document any manual adjustments needed after import
- Note site-specific settings that need customization (URLs, IDs, etc.)
- Record which export is the “current production” version
Example documentation:
Export: mysite-digiconsent-2025-01-15.json
Date: January 15, 2025
Changes: Added TikTok Pixel, updated banner design to match new branding
Notes: Privacy policy URL needs to be updated after import
Status: Current production configurationTroubleshooting Import/Export Issues
Import Fails or Shows Errors
Issue: Import doesn’t work or shows error message
Possible causes and solutions:
- File corruption: Download export again, ensure file wasn’t modified
- Wrong file type: Verify you’re uploading a JSON file from DigiConsent export
- Version incompatibility: Export from newer plugin version may not work on older version; update plugin
- File size limits: PHP upload limit too small; increase in php.ini or contact host
- File encoding: Ensure file is UTF-8 encoded, no BOM
Settings Don’t Apply After Import
Issue: Import succeeds but settings don’t seem to change
Solutions:
- Clear browser cache and cookies
- Hard refresh the page (Ctrl+F5 or Cmd+Shift+R)
- Check in incognito/private window
- Verify settings in DigiConsent admin panel actually changed
- Clear site caching plugin (WP Rocket, W3 Total Cache, etc.)
- Check CDN cache if using Cloudflare or similar
Some Settings Missing After Import
Issue: Only partial configuration imported
Solutions:
- Verify export file is complete (open in text editor and check structure)
- Check if export came from significantly different plugin version
- Some features may not exist on target site (newer plugin has features old one doesn’t)
- Import might be selective—check if there are options to import specific sections
URLs or IDs Don’t Work After Import
Issue: Privacy policy links broken, tracking IDs don’t work
Solutions:
- URLs are site-specific; update privacy policy URL after import
- Tracking IDs (GA4, Facebook Pixel) are account-specific; update to correct IDs for new site
- Logo URLs may need updating if using absolute paths
- Check any hardcoded domain references in custom scripts
Advanced: Manual JSON Editing
For advanced users, JSON export files can be manually edited before import.
When to Edit Manually
- Batch-updating tracking IDs across multiple site exports
- Finding and replacing URLs or domain names
- Creating templates with placeholder values
- Debugging import issues by examining file structure
How to Edit Safely
- Use proper editor: Use a code editor (VS Code, Sublime Text) or online JSON editor
- Validate JSON: Use JSONLint.com or similar to verify structure after editing
- Make backup: Keep original file before editing
- Edit carefully: Don’t change structure, only values
- Test on staging: Import edited file on test site first
Example: Find and replace all instances of old-domain.com with new-domain.com in a text editor before importing to a new site.
Integration with Development Workflow
For developers and agencies, integrate import/export into your workflow.
Git Version Control
Store DigiConsent configuration in your project repository:
- Create
/config/digiconsent/folder in your project - Export configuration and save to this folder
- Commit to Git with descriptive message
- Track changes over time
- Team members can see configuration history
- Easy rollback to previous versions
Deployment Automation
Automate imports as part of deployment:
- Include configuration export in version control
- Deployment script imports configuration to staging/production
- Ensures consistent setup across environments
- Reduces manual configuration errors
Some deployment tools support running WP-CLI commands that could trigger imports programmatically.
Import/Export Best Practices Checklist
- Export configuration before making major changes
- Use descriptive, dated filenames for exports
- Store exports in secure, backed-up location (cloud storage or version control)
- Document what’s in each export file
- Test imports on staging before production
- Verify all settings after import
- Update site-specific values (URLs, tracking IDs) after import
- Clear all caches after import (browser, site, CDN)
- Maintain regular backup schedule (monthly minimum)
- Keep current production export readily accessible
- Create templates for different use cases
- Validate JSON structure if manually editing files
- Train team members on import/export process
- Include export files in project handoff documentation
Security Considerations
Export files contain configuration data that should be handled securely:
- Don’t publish publicly: Export files may contain tracking IDs or internal information
- Secure storage: Use password-protected cloud storage or private repositories
- Access control: Limit who can export/import configurations
- Clean sensitive data: Remove sensitive IDs or keys before sharing templates
- Audit imports: Review configuration before importing from untrusted sources
While export files don’t contain user data or passwords, they do reveal your tracking setup and configuration choices, which could be considered sensitive business information.
Conclusion
Import and export functionality transforms DigiConsent from a single-site configuration tool into a scalable, enterprise-ready consent management system. By regularly exporting your configuration, maintaining organized backups, and strategically using imports for multi-site deployments and disaster recovery, you protect your investment in consent compliance and dramatically reduce setup time for new sites.
Whether you’re an agency managing dozens of client sites, a developer working across staging and production environments, or a website owner who simply wants peace of mind that your consent setup is backed up, the import/export features provide essential capabilities for professional cookie consent management. The key is establishing good habits: export regularly, organize systematically, document thoroughly, and test carefully when importing to ensure your consent implementation remains robust and compliant across all your web properties.
Similar Articles
- Functional Cookies Configuration – Intercom, Zendesk, Chat Widgets
- Analytics Cookies Configuration – Setting Up Google Analytics, GTM, and Tracking
- Necessary Cookies Setup – Configuring Essential Cookies Category
- Hotjar and Matomo Analytics Integration Guide
- General Settings Overview – DigiConsent Configuration
- TikTok Pixel Integration for Marketing Tracking