Safe Mode
Safe Mode is an emergency recovery mechanism that places Dran Admin Cleaner (DAC) into a global recovery state.
It is intended for situations where an incorrect DAC configuration interferes with normal WordPress administration and the Recovery URL is unavailable, cannot be completed, or does not provide enough recovery access to correct the problem.
Unlike the Recovery URL, Safe Mode is enabled outside the WordPress admin area by adding a constant to wp-config.php.
Safe Mode provides broader recovery access than a Recovery URL session and should be used only when necessary.
When to Use Safe Mode
In most situations, use the Recovery URL first.
A Recovery URL session is designed to resolve common DAC configuration problems while keeping sensitive DAC management operations restricted.
Use Safe Mode when:
- You cannot access Dran Admin Cleaner normally.
- A Page Lock prevents access to an important admin area.
- Your Recovery URL is unavailable.
- The Recovery URL process cannot be completed.
- The limited Recovery URL session does not allow you to correct the affected DAC management setting.
- DAC configuration prevents an authorized WordPress administrator from managing DAC normally.
Safe Mode should be temporary.
It is a recovery mechanism, not a normal operating mode.
Enable Safe Mode
To enable Safe Mode, you need access to your WordPress files.
You can usually access them through:
- Your hosting control panel.
- FTP or SFTP.
- SSH.
- A file manager provided by your hosting provider.
Open the wp-config.php file in the root directory of your WordPress installation.
Add the following constant before the standard WordPress stop-editing line:
define('DRAN_AC_SAFE_MODE', true);
For example:
define('DRAN_AC_SAFE_MODE', true);
/* That's all, stop editing! Happy publishing. */
Save the file, then return to the WordPress admin area.
What Safe Mode Does
When DAC detects:
define('DRAN_AC_SAFE_MODE', true);
it enters a global recovery state.
While Safe Mode is active:
- Normal DAC cleanup and access restrictions are suspended.
- Authenticated WordPress users with the
manage_optionscapability can access DAC management functions needed for recovery. - Existing DAC configuration remains stored.
- DAC settings are not automatically reset or deleted.
This provides a broader recovery path than the temporary Recovery URL session.
Safe Mode remains active until the constant is removed or disabled.
Safe Mode and WordPress Permissions
Safe Mode does not change WordPress roles or capabilities.
It does not:
- Give a user
manage_options. - Turn a lower-privileged account into an Administrator.
- Bypass WordPress login.
- Change passwords.
- Modify permissions provided by WordPress or other plugins.
The user must already:
- Be authenticated in WordPress.
- Have the
manage_optionscapability.
However, Safe Mode does intentionally change access at the DAC level.
While global Safe Mode is active, an authenticated WordPress user with manage_options can access DAC management for recovery even when normal DAC management rules would otherwise prevent that access.
A useful distinction is:
WordPress permissions determine whether the user is authorized as an administrator.
DAC Safe Mode temporarily allows those authorized administrators to manage DAC for recovery.
Safe Mode does not grant new WordPress privileges, but it does temporarily broaden DAC-level management access for users who already have the required WordPress capability.
Safe Mode vs. Recovery URL Scope
Recovery URL and Safe Mode are intentionally different.
A Recovery URL session is temporary and limited in scope.
It allows an authorized administrator to correct supported cleanup and access problems, but protected DAC management operations remain unavailable during that session.
For example, a Recovery URL session does not allow changes to protected areas such as:
- Owner and Manager configuration.
- Recovery credentials.
- Global Safe Mode settings.
- Uninstall data settings.
- Plugin menu visibility.
- Audit Log deletion.
Safe Mode through DRAN_AC_SAFE_MODE is the broader fallback when a problem cannot be corrected within the limited Recovery URL scope.
Use the Recovery URL first whenever it is sufficient.
Correct the Problem
Once Safe Mode is active, log in using a WordPress account with manage_options and open Dran Admin Cleaner.
Identify the configuration that caused the problem.
For shared cleanup issues, review:
- Global Audience to confirm who receives the cleanup configuration.
- Menu Cleaner if important navigation was hidden.
- Notice Cleaner, Dashboard Cleaner, or Admin Bar Cleaner if the issue involves those areas.
For access problems caused by Page Locks, review the Page Lock rule itself.
Manual Page Locks use their own targeting conditions, so check:
- Which page is locked.
- Which roles or users the rule targets.
- Whether the redirect destination is correct.
- Whether another Page Lock affects the same workflow.
- Whether the rule should exist at all.
If the problem involves DAC management or safety configuration, review the relevant management settings available while Safe Mode is active.
Correct the problem and save your changes before disabling Safe Mode.
Disable Safe Mode
After correcting the configuration, return to wp-config.php.
Remove:
define('DRAN_AC_SAFE_MODE', true);
or change it to:
define('DRAN_AC_SAFE_MODE', false);
Save the file.
DAC will leave global Safe Mode and return to normal operation.
Your saved configuration will begin applying again.
Test the affected workflow immediately.
Confirm that:
- Trusted DAC administrators can access the areas they need.
- Global Audience applies to the intended users.
- Cleaner features behave as expected.
- Page Locks affect only the roles or users defined by their rules.
- DAC management access has returned to its normal behavior.
- Normal WordPress workflows continue to work.
Do Not Leave Safe Mode Enabled
Safe Mode is intended only for emergency recovery and troubleshooting.
While Safe Mode is active:
- DAC cleanup restrictions are bypassed.
- Page-level DAC restrictions may not be enforced normally.
- Users with
manage_optionsreceive broader DAC management access for recovery.
Leaving Safe Mode enabled therefore changes both the experience DAC provides to users and the normal DAC management boundary.
Once the problem has been corrected and tested, disable Safe Mode.
Safe Mode is a temporary global recovery state, not a permanent operating mode.
Safe Mode Does Not Delete Your Configuration
Enabling Safe Mode does not reset DAC.
Your existing configuration remains stored, including supported settings such as:
- Global Audience.
- Menu Cleaner configuration.
- Page Locks.
- Notice Cleaner settings.
- Dashboard Cleaner settings.
- Admin Bar Cleaner settings.
- DAC management and safety configuration.
Safe Mode changes how DAC behaves while recovery is active.
It does not automatically remove the configuration that caused the problem.
When Safe Mode is disabled, DAC resumes using the saved configuration.
This is why the problematic setting should be corrected before leaving Safe Mode.
Safe Mode vs. Deactivating DAC
If you can access the WordPress plugin management screen, deactivating DAC may also stop DAC functionality.
However, Safe Mode is specifically designed for recovery.
It allows DAC to remain installed and its configuration to remain available while authorized administrators correct the problem.
This is especially useful when:
- DAC configuration prevents normal DAC management.
- You need to inspect the existing settings before changing them.
- You want to preserve the configuration rather than disable or remove the plugin.
Use DAC's recovery mechanisms before manually removing plugin files or deleting stored configuration.
Safe Mode vs. Recovery URL
Recovery URL and Safe Mode provide two different levels of recovery.
| Recovery URL | Safe Mode | |
|---|---|---|
| Recommended first option | Yes | No |
| Requires saved recovery information | Yes | No |
| Requires WordPress authentication | Yes | Yes |
Requires manage_options |
Yes | Yes |
| Requires confirmation form | Yes | No |
| Requires server or file access | No | Yes |
Requires editing wp-config.php |
No | Yes |
| Recovery scope | Limited | Global recovery state |
| DAC management access | Limited recovery scope | Broader access for authorized administrators |
| Protected DAC management operations | Remain restricted | Available according to Safe Mode behavior |
| Bypasses DAC restrictions | Yes, within recovery scope | Yes |
| Recovery duration | 15 minutes | Until Safe Mode is disabled |
| Deletes DAC configuration | No | No |
| Intended for temporary use | Yes | Yes |
The recommended recovery order is:
DAC configuration problem → Try Recovery URL → Correct the problem if the limited recovery scope is sufficient → If Recovery URL is unavailable or insufficient, enable Safe Mode → Correct the configuration → Disable Safe Mode → Test normal access
If You Cannot Edit wp-config.php
If you do not have access to the WordPress files, contact the person or provider responsible for managing the website.
This may be:
- Your hosting provider.
- Your website developer.
- Your agency.
- Your server administrator.
Ask them to add:
define('DRAN_AC_SAFE_MODE', true);
to wp-config.php.
Once the DAC configuration has been corrected, the constant should be removed or changed to:
define('DRAN_AC_SAFE_MODE', false);
Do not leave the constant enabled after recovery is complete.
Recommended Recovery Order
If a DAC configuration causes an access problem:
- Confirm that you are using the correct WordPress account.
- Try the Recovery URL first.
- Use the 15-minute recovery session to correct supported cleanup or access settings.
- If the problem involves a protected DAC management setting, or Recovery URL cannot be used, enable Safe Mode.
- Log in using an authorized account with
manage_options. - Correct the DAC configuration while Safe Mode is active.
- Disable Safe Mode.
- Test the affected roles and users again.
- Test Page Locks separately where applicable.
- Confirm that DAC management access has returned to normal.
- Create a backup once the configuration is working correctly.
Avoid deleting DAC settings, manually modifying the database, or removing plugin files as your first troubleshooting step.
DAC's recovery mechanisms are designed to help restore access while preserving the existing configuration whenever possible.
Next Step
Once you understand DAC's recovery mechanisms, continue with Reset & Factory Reset to learn how to intentionally remove selected configuration data or return DAC to its initial state.