Home › Forums › Support › Disable PHP Execution in Hooks? This topic has 3 replies, 3 voices, and was last updated 6 years ago by Leo. Viewing 4 posts - 1 through 4 (of 4 total) Author Posts November 17, 2017 at 8:26 am #426868 arthur Hi I just found this because file edit was true in wp-config: https://docs.generatepress.com/article/disallow-php-execution/ Does this mean that even if the checkbox marked ‘allow php execution’ is checked, it still won’t run php commands? thanks! November 17, 2017 at 9:31 am #426932 TomLead Developer Lead Developer That’s correct – if executing PHP in hooks is disabled in your wp-config.php file, no PHP will be executed inside them (even if it’s already set). November 21, 2017 at 2:09 pm #430208 arthur Okay. So as of now I don’t need PHP in hooks – however, it seems like allowing PHP in hooks is not secure – so if I need to execute PHP at a hook point, what do I do? Write it into the functions.php file? November 21, 2017 at 3:09 pm #430231 LeoStaff Customer Support You would remove the code to disable PHP execution. The default is allowing PHP execution. Code should be added using one of these methods: https://docs.generatepress.com/article/adding-php/ Author Posts Viewing 4 posts - 1 through 4 (of 4 total) You must be logged in to reply to this topic. Log In Username: Password: Keep me signed in Log In