Theme Sync
Theme Sync is a feature that enables bidirectional synchronization between JSON files in your theme directory and the SleekRank database. This is useful for managing page group configurations as code.
How It Works
When Theme Sync is enabled, SleekRank watches for JSON configuration files in a designated directory within your active theme. Changes flow in both directions:
- Theme → Database: When you update a JSON file in your theme, the changes are synced to the database on the next page load
- Database → Theme: When you update settings in WP Admin, the changes are written back to the theme JSON files
Configuration Directory
By default, SleekRank looks for configuration files in:
/your-theme/sleek-rank/
Each page group can have a corresponding JSON file in this directory.
Benefits
- Version Control: Track page group configurations in Git alongside your theme
- Deployment: Push configuration changes through your deployment pipeline
- Team Collaboration: Share page group setups across development environments
- Backup: Theme files serve as a natural backup of your configurations
Conflict Resolution
If both the theme file and the database have been modified since the last sync, the most recently modified version takes priority. You can also manually trigger a sync from either direction in the SleekRank settings.