[Defender] Defender Deletes index.php

Hi,
I ran the file scan using Defender and it identified that index.php in the root had been modified. I used the fix function to restore to the original but it left the index.php blank. I downloaded and copied the original into index.php and it still identifies it as being modified and when I use the restore function it still blanks it. Not sure if something is awry in the Defender plugin but thought I would report it. For the moment I have told Defender to ignore the issue. Thoughts on how to proceed?
Thanks,
Pat

  • Nahid

    Hey wlpdrpat !
    Hope you are having a great day!

    I'm sorry to hear about the issue that you encountered. I tried to replicate it in my test multisite installation but I couldn't. Here's a screenshot for reference:

    This seems to be an issue specific to your site. Could you please go through the following troubleshooting tests which would help us determine the source of the issue?

    1. Plugin/theme conflict test: Try running a full plugin/theme conflict test just to make sure no other plugin(s)/the theme on your site is/are conflicting with Defender and thus causing the issue. The basic concept is to temporarily disable all the plugins except Defender and WPMU DEV Dashboard, switch to a default WordPress theme and check if the issue still persists. If it doesn't, please enable all plugins and the theme one after another to see activating which brings back the issue. This handy flowchart can help you do a full plugin/theme conflict test.

    2. Enable debugging: If the plugin/theme conflict test doesn't help, please enable WP_DEBUG. You can enable debugging by putting the following constants in the wp-config.php file:

    // Enable WP_DEBUG mode
    define( 'WP_DEBUG', true );
    // Enable Debug logging to the /wp-content/debug.log file
    define( 'WP_DEBUG_LOG', true );
    // Disable display of errors and warnings
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', 0 );

    These constants must be added before the line "/* That's all, stop editing! Happy blogging. */" for them to work. Please make sure identical constants are replaced if they were already there previously.

    Enabling debugging in WordPress will log any errors that the site encounters in a log file named "debug.log" located in the "wp-content" folder. Please upload the debug.log file in a cloud storage platform like Dropbox and attach the shared link in your next response so that we can take a look into it. You can know more about WordPress debugging in this handy article.

    Note: It is highly recommended that the site is backed up before the tests or the tests are done in a cloned staging site.

    Hope this helps. We'll be looking forward to hearing from you. Thanks!

    Kind regards,
    Nahid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.