[Support request] PHP Execution

Home Forums Support [Support request] PHP Execution

Home Forums Support PHP Execution

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #795178
    keri

    Hi, I really need php execution in elements but also I need to set

    define( ‘DISALLOW_FILE_EDIT’, true );

    in wp-config.php for security and I used https://docs.generatepress.com/article/disallow-php-execution/#removing-the-admin-message code by Snippet plugin but it doesn’t work – I still can’t use php in elements hook. Please help.

    #795677
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    You can tell Elements to execute PHP regardless like this:

    add_filter( 'generate_hooks_execute_php', '__return_true' );

    Let me know if that helps or not 🙂

    #796208
    keri

    Yes, it works very good and also I have “DISALLOW_FILE_EDIT’, true”, thank you very much! But is this good for security of WP? If yes it should be in GPP documentation, I think.

    #796754
    Tom
    Lead Developer
    Lead Developer

    If someone were to gain access to your Dashboard (already very bad), they could potentially use PHP to gain access to your server. This is why DISALLOW_FILE_EDIT is a good idea if your Dashboard is at risk.

    If your Dashboard is locked down (2FA, strong password etc..), then you’re likely in the clear 🙂

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