Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid redefining DISALLOW_FILE_EDIT #726

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joshuafredrickson
Copy link
Sponsor

Some security plugins will automatically edit wp-config.php and then throw an error:

Fatal error: Uncaught Roots\WPConfig\Exceptions\ConstantAlreadyDefinedException:
Aborted trying to redefine constant 'DISALLOW_FILE_EDIT'.
`define('DISALLOW_FILE_EDIT', ...)` has already been occurred elsewhere.

I know this happens with at least two plugins:

  • Solid Security Pro (occurs automatically upon activation)
  • Sucuri Security (occurs when option is activated in settings)

Of course, adding these constants to wp-config.php in Bedrock isn't ideal, but this check at least keeps the fatal error from triggering when working with these plugins.

I'm not sold this is something that Bedrock needs to address... It's just something I've encountered a few times in the wild. I could be convinced either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant