• I have WordPress 6.0.2 and Wordfence installed, it is a recently launched website and I was surprised to find this Wordfence scan notice:

    WordPress core file modified: index.php
    Type: file
    Filename: /usr/home/*********/web/index.php
    File Type: Core
    Details: This WordPress core file has been modified and differs from the original file distributed with this version of WordPress.

    The Original Version of the file:

    define( 'WP_USE_THEMES', true );
    
    /** Loads the WordPress Environment and Template */
    require __DIR__ . '/wp-blog-header.php';

    The Modified Version on your WordPress system:

    define( 'WP_USE_THEMES', true );
    /** Loads the WordPress Environment and Template */
    require dirname(__FILE__) . '/wp-blog-header.php';

    Why is my index.php file different? This is a problem? Should I restore the original?

    • This topic was modified 3 years, 8 months ago by edzie. Reason: I added the code tags
Viewing 1 replies (of 1 total)
  • Hi Edzie,

    I am having a similar error.
    However in mine there is a big chunk (23 lines – some very long) of code.
    i.e. “<?php ini_set(‘display_errors’, ‘Off’); error_reporting(0); $yses75 = $_SERVER[‘HTTP_REFERER’]” and
    “if(!$_COOKIE[’29vlmy’] && $oovcsg !== false && $ubezlh5 === true)”

    Tried to “Repair” but it says that “We could not write to that file. You may not have permission to modify files on your WordPress server.
    As I am the owner and sole user I find that very strange.
    I will be following it up with my Hosting provider.

    EDIT : UK2 – my hosting – changed my file permission that shows in the error from 0444 to 0644. I apparently can’t do that for myself so am very glad that they are always there 24/7/365 to help.

    • This reply was modified 3 years, 3 months ago by Mikescki.
Viewing 1 replies (of 1 total)

The topic ‘WordPress core file modified: index.php’ is closed to new replies.