• My latest Wordfence scan showed my index.php was modified. I have no idea whether the modifications were made by a hacker or were a result of updating the theme recently. Can anybody identify anything malicious in this modified version?:

    <?php
    ob_start();
    define(‘WP_USE_THEMES’, true);
    require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ );
    $__content__ = ob_get_contents();
    ob_clean();
    echo preg_replace(‘#http\:#i’, ”, $__content__);
    exit(1);

Viewing 2 replies - 1 through 2 (of 2 total)
  • The same thing happened to my site overnight. Here is the index.php before the change:

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */
    
    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true); 	 	 
    
    /** Loads the WordPress Environment and Template */
    require( dirname( __FILE__ ) . '/wp-blog-header.php' );

    My updated file is the same as the OP’s.

    Is the new file correct?

    Thanks!!!

    Hey,
    Just to clarify the index.php file is a wordpress file not something this theme controls.

    If you look in a clean copy of wordpress the index.php file has not changed. i would suggest fixing your file as well as checking your sites security and checking for other changed files.

    Kadence Themes

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘index.php modified’ is closed to new replies.