• Resolved ptlojas

    (@ptlojas)


    How can I disable the creation of llms.txt by your plugin? I’m using Agentimus, which generates that file. I have the Pro version.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Esteban

    (@estebandezafra)

    Hi, thanks for reporting this. It is possible that both plugins provide /llms.txt as a virtual WordPress endpoint rather than as a physical file, so we would like to confirm the exact behavior before suggesting a solution.

    Could you please let us know what happens when BotWriter is active alongside Agentimus?

    • Does /llms.txt show BotWriter content, Agentimus content, or an error?
    • Does temporarily disabling BotWriter make Agentimus’s expected content appear?
    • If possible, please share the URL to your /llms.txt page or a screenshot of its contents.

    BotWriter does not intentionally overwrite another plugin’s physical llms.txt file. Once we can confirm whether this is a virtual-endpoint conflict, we can advise on the best way to disable or prioritize it.

    Thread Starter ptlojas

    (@ptlojas)

    hi,

    • Does /llms.txt show BotWriter content, Agentimus content, or an error? BotWriter content (but i need Agentimus content,)
    • Does temporarily disabling BotWriter make Agentimus’s expected content appear? if i disable, Agentimus content
    • If possible, please share the URL to your /llms.txt page or a screenshot of its contents.

    one exemple: https://otreinador.net/llms.txt

    I came up with a temporary solution by adding this code:

    add_action( ‘wp_loaded’, function() {

    // 1. Inspeciona e remove a funcao anonima do hook parse_request
    if ( isset( $GLOBALS['wp_filter']['parse_request'] ) ) {
        foreach ( $GLOBALS['wp_filter']['parse_request']->callbacks as $priority => $callbacks ) {
            foreach ( $callbacks as $hash => $callback ) {
                if ( isset( $callback['function'] ) && $callback['function'] instanceof Closure ) {
                    $ref = new ReflectionFunction( $callback['function'] );
                    if ( strpos( $ref->getFileName(), 'llmstxt.php' ) !== false ) {
                        unset( $GLOBALS['wp_filter']['parse_request']->callbacks[ $priority ][ $hash ] );
                    }
                }
            }
        }
    }
    
    // 2. Inspeciona e remove a funcao anonima do hook template_redirect (prioridade 0)
    if ( isset( $GLOBALS['wp_filter']['template_redirect']->callbacks[0] ) ) {
        foreach ( $GLOBALS['wp_filter']['template_redirect']->callbacks[0] as $hash => $callback ) {
            if ( isset( $callback['function'] ) && $callback['function'] instanceof Closure ) {
                $ref = new ReflectionFunction( $callback['function'] );
                if ( strpos( $ref->getFileName(), 'llmstxt.php' ) !== false ) {
                    unset( $GLOBALS['wp_filter']['template_redirect']->callbacks[0][ $hash ] );
                }
            }
        }
    }

    }, 1 );

    Plugin Author Esteban

    (@estebandezafra)

    Hi, thanks for confirming and for sharing the workaround. You are right: this is a conflict between two plugins serving /llms.txt through virtual WordPress endpoints.

    I’m adding a dedicated option to BotWriter so its /llms.txt endpoint can be disabled cleanly, without custom code. I’ll publish this in the next BotWriter update shortly.

    Plugin Author Esteban

    (@estebandezafra)

    The fix is now available in the latest BotWriter update. Please update BotWriter, then go to BotWriter > SEO > llms.txt, uncheck “Enable BotWriter llms.txt endpoint”, and save the settings.

    BotWriter will then stop serving /llms.txt, allowing Agentimus to provide its content instead.

    I’m marking this topic as resolved.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.