Archived topic
DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hook
6 replies · Started by Janine on March 9, 2018
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!
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/
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!
Tom,
But if add that snippet to my functions.php, then I won't know if the wp-config.php changes again, right?
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.
Thanks, Tom.
No problem :)