Archived topic
DISALLOW_FILE_EDIT is defined
8 replies · Started by Carlos on March 23, 2018
Hi,
After install a plugin i have this message
DISALLOW_FILE_EDIT is defined. You should also disallow PHP execution in GP Hooks.
Here an screeshoot
Can you help me to solve it please?
Thaks
Hi there,
This article explains it all: https://docs.generatepress.com/article/disallow-php-execution/
Let me know if you need more info.
Hi Leo,
How can i do that?
The documentation says about to remove the admin message Disable File Editing
It is recommended to disable file editing within the WordPress dashboard. WordPress has a constant that disabled this editing via the wp-config.php file. Append the following two lines to the end of your wp-config file:
## Disable Editing in Dashboard
define('DISALLOW_FILE_EDIT', true);
Can i solve this problem installing code snippets plugin and paste that code in in?
Thanks
I'm not sure I understand? Where are those instructions from?
If you add the above code to your wp-config.php file, then you just need to add the GP one below it:
define( 'GENERATE_HOOKS_DISALLOW_PHP', true );
Hi,
When i installed a security plugin it appeared in my WP admin
Here an screeshoot
How I disallow PHP execution in GP Hooks.
Thanks
You disallow it by pasting this code into your wp-config.php file:
define( 'GENERATE_HOOKS_DISALLOW_PHP', true );
It can be added directly after this line:
define('DISALLOW_FILE_EDIT', true);
Hi Tom,
Can i paste that code in code snippets plugin to solve it?
Unfortunately no. It has to be the place Tom specified above.