Archived topic
Disallow File Edits not Changing
3 replies · Started by Jennifer on September 26, 2022
Hello,
I have read all your documentation, but for some reason this message still appears, "Unable to execute PHP as DISALLOW_FILE_EDIT is defined."
I am unsure what the problem is.
Any assistance would be great.
Hi Jennifer,
Please check David's answer here regarding this issue:
https://generatepress.com/forums/topic/unable-to-execute-php-as-disallow_file_edit-is-defined-2/#post-1538699
Hi Ying,
I did read those documents. This is why I am writing to you. Did you see the images I attached?
I followed what this document "https://docs.generatepress.com/article/disallow-php-execution/" said. Because I am using Sucuri plugin so I do have:
define( 'DISALLOW_FILE_EDIT', true ); AND I ADDED
define( 'GENERATE_HOOKS_DISALLOW_PHP', true );
but under elements it still shows “Unable to execute PHP as DISALLOW_FILE_EDIT is defined.”
Am I missing something?
Thank you
Hi Jeniffer,
Can you try adding this through Code Snippets?:add_filter( 'generate_hooks_execute_php', '__return_true' );
Adding PHP: https://docs.generatepress.com/article/adding-php/#code-snippets