Safe Mode is a resource-conservative operating mode that helps Content Guard Pro work reliably on limited hosting environments.
What is Safe Mode? #
Safe Mode adjusts scan behavior to use fewer resources:
| Setting | Normal | Safe Mode |
| ——— | ——– | ———– |
| Batch Size | 100 | 25 |
| Batch Delay | 2 seconds | 5-10 seconds |
| Progress Saves | Every batch | Every batch (more frequent) |
| Memory Target | 50% of limit | 25% of limit |
When Safe Mode Activates #
Automatic Activation (Default) #
With Safe Mode set to “Auto”, it activates when:
1. Large Site Detected:
– More than 2 million content rows
– Database larger than 2-5 GB
2. Resource Stress Detected:
– Average query time > 300ms
– Memory usage > 50% of limit
– Batch runtime > 5 seconds
3. Previous Failures:
– Recent scan timeouts
– Memory exhaustion errors
– Database connection issues
Manual Activation #
Set Safe Mode to “Always On” in Settings:
1. Go to Content Guard Pro → Settings
2. Find Performance section
3. Set Safe Mode to “Always On”
4. Save changes
Safe Mode Indicators #
During Scans #
When Safe Mode is active, you’ll see:
- “Safe Mode Active” badge in progress panel
- Lower batch count displayed
- Longer estimated completion time
In Settings #
The Safe Mode setting shows current state:
- Auto: “Currently: Active” or “Currently: Inactive”
- Always On: Permanently active
- Always Off: Never activates (use with caution)
Impact of Safe Mode #
Scan Duration #
Scans take longer in Safe Mode:
- ~3-5x longer for same content
- More batches to process same items
- Longer delays between batches
Resource Usage #
Significantly reduced impact:
- Lower peak memory
- Fewer concurrent database queries
- Less CPU usage per batch
Reliability #
Improved stability:
- Fewer timeout failures
- Better recovery from interruptions
- More frequent progress saves
When to Use Safe Mode #
Recommended Scenarios #
✅ Always On:
- Shared hosting (Bluehost, HostGator, etc.)
- Sites with frequent timeout issues
- Limited PHP memory (< 128MB)
- High-traffic sites (scan during peak)
✅ Auto (Default):
- Most sites
- Managed WordPress hosting
- VPS with 2GB+ RAM
- Sites with occasional issues
✅ Always Off:
- Dedicated servers with ample resources
- Sites needing fastest possible scans
- Testing environments
- When you’ve verified resources are sufficient
Not Recommended Off When: #
- Shared hosting environment
- Frequent scan failures
- Memory errors in logs
- Hosting provider has strict limits
Configuring Safe Mode #
Setting Safe Mode #
1. Go to Content Guard Pro → Settings
2. Scroll to Performance section
3. Find Safe Mode setting
4. Choose:
– Auto: Let plugin decide
– Always On: Permanent Safe Mode
– Always Off: Disable Safe Mode
5. Click Save Changes
Fine-Tuning Within Safe Mode #
Even with Safe Mode, you can adjust:
More Conservative:
- Reduce batch size further (10-15)
- Increase batch delay (10-15 seconds)
Less Conservative:
- Increase batch size (35-50)
- Decrease batch delay (3-5 seconds)
Safe Mode and Scheduled Scans #
Scheduled Scans #
- Use Safe Mode settings automatically
- Run during configured time
- Complete even if slower
On-Save Scans #
- Not affected by Safe Mode
- On-save scans are already lightweight
- Only scan single post content
Troubleshooting Safe Mode #
Scans Still Failing in Safe Mode #
If scans fail even with Safe Mode:
1. Reduce batch size further:
– Try 10-15 items per batch
2. Increase delay:
– Try 15-20 seconds between batches
3. Check server limits:
– PHP max_execution_time
– Memory limit
– Max input time
4. Contact hosting:
– May need to adjust server settings
– Consider hosting upgrade
Safe Mode Won’t Deactivate (Auto) #
If Auto Safe Mode stays active:
1. Check why it activated:
– Go to Diagnostics
– Look for resource warnings
2. Resolve underlying issue:
– Optimize database
– Upgrade hosting
– Fix performance bottlenecks
3. Manually override:
– Set to “Always Off” (if confident)
– Monitor for issues
Performance Comparison #
Quick benchmark comparison (100 posts):
| Mode | Duration | Memory Peak | CPU Impact |
| —— | ———- | ————- | ———— |
| Normal | 45 seconds | 128 MB | Medium |
| Safe Mode | 3 minutes | 64 MB | Low |
Safe Mode trades speed for reliability.
Best Practices #
1. Start with Auto – Let the plugin decide
2. Monitor first scans – Watch for issues
3. Enable Safe Mode proactively – If on shared hosting
4. Don’t disable without testing – Verify resources are sufficient
5. Schedule during off-peak – Regardless of mode