[Resolved] DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hook

Home Forums Support [Resolved] DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hook

Home Forums Support DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hook

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #515624
    Janine

    Hi.

    I keep adding the required rule to my wp-config.php file.

    The message goes away.

    But it keeps coming back.

    This is the fourth time! HELP!

    #515758
    Tom
    Lead Developer
    Lead Developer

    That’s strange – does the code in your wp-config.php file still exist?

    You can force the message to stay away with this function: https://docs.generatepress.com/article/disallow-php-execution/#removing-the-admin-message

    That can be added using one of these methods: https://docs.generatepress.com/article/adding-php/

    #516624
    Janine

    Hi, Tom.

    The code is no longer in my wp-config.php file.

    I will try your suggestion and see if that corrects the problem.

    Here’s how the code looks in my wp-config.php file after I add your snippet:

    // BEGIN iThemes Security – Do not modify or remove this line
    // iThemes Security Config Details: 2
    define( ‘DISALLOW_FILE_EDIT’, true ); // Disable File Editor – Security > Settings > WordPress Tweaks > File Editor
    define( ‘GENERATE_HOOKS_DISALLOW_PHP’, true );
    // END iThemes Security – Do not modify or remove this line

    Thanks!

    #516625
    Janine

    Tom,

    But if add that snippet to my functions.php, then I won’t know if the wp-config.php changes again, right?

    #516765
    Tom
    Lead Developer
    Lead Developer

    Try adding the define() statement outside of the iThemes area.

    iThemes will likely remove the custom statement if it’s inside their block of code.

    #516857
    Janine

    Thanks, Tom.

    #517061
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.