• Resolved gopa4

    (@gopa4)


    Hello,

    I get this notice (debug enabled):

    Notice: Constant DISALLOW_FILE_EDIT already defined in /wp-config.php on line 98

    Is this related to Wordfence?

    After disabling Wordfence the warning is still there.

    In my wp-config.php there is:

    define( ‘DISALLOW_FILE_EDIT’, true );

    Is it added by Wordfence or a default WP setting? Can I delete it?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support wfphil

    (@wfphil)

    Hi @gopa4

    Wordfence doesn’t have an option to set the WordPress DISALLOW_FILE_EDIT constant.

    The PHP notice means that you have the line of code replicated more than once somewhere in your WordPress file system.

    Thread Starter gopa4

    (@gopa4)

    Hi @wfphil

    I have found it with String locator plugin. The code was 2x in my wp-config.php:)
    Thanks!
    Case Closed!

    • This reply was modified 3 years, 9 months ago by gopa4.
    Plugin Support wfphil

    (@wfphil)

    Hi @gopa4

    The PHP notice error means that you have the line of code below existing more than once somehere in your WordPress file system.

    define( ‘DISALLOW_FILE_EDIT’, true );

    I can’t tell you where that might be. You could ask your hosting provider to search for it using the command line interface on the server to see in which files the string DISALLOW_FILE_EDIT has been set.

    Note that it is found in the wp-includes/capabilities.php file twice.

    Plugin Support wfphil

    (@wfphil)

    Hi @gopa4

    With regards my reply above. If your hosting provider does help you then the DISALLOW_FILE_EDIT string will also be found in the two Wordfence files below, but this is for just for the state status reporting in the WordPress Settings section on the Tools >> Diagnostics page:

    wordfence/lib/menu_tools_diagnostic.php
    wordfence/views/diagnostics/text.php

    Thread Starter gopa4

    (@gopa4)

    Hi @wfphil

    I have found it with String locator plugin (it was very easy to find). The code was 2x in my wp-config.php:)
    Thank you for your information!
    Case Closed!Thank you for your help.

    PS: We are on a shared hosting. Can automatic scans be only performed during certain hours (at night) or disabled (paused) during rush hours?

    Plugin Support wfphil

    (@wfphil)

    Hi @gopa4

    Glad to hear you found the duplicate line.

    Users of the free version of the plugin cannot schedule scans. You can read more about scan scheduling here:

    https://www.wordfence.com/help/scan/scheduling/

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘DISALLOW_FILE_EDIT already defined’ is closed to new replies.