• Wordfence has been warning me about unknown files in WordPress core for a while now. These are multiple php.ini files located in various locations (eg. public_html/wp-admin/css/php.ini), and they appear to have been placed there by my previous host, IONOS.

    I have moved to a different host and want to try and delete all those files but Wordfence only shows one file at a time. There are 200 files in total which means I have to run a scan 200 times to delete each file. Is there a way to delete all the files at once?

    Otherwise, the solution I’ve come up with is to manually delete all php.ini in cPanel file manager, except for /public_html/wp-admin/php.ini which I believe is the only one I need?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @lunallycha, thanks for getting in touch!

    Yes, we’ve seen IONOS click & build WordPress installations creating php.ini files in every WordPress core folder so I’m aware of the original issue. In those cases when they’re still hosted there, they have to be set to “ignore”.

    In terms of why Wordfence doesn’t allow bulk delete on scan results, it’s to prevent a situation where default-clicking “delete all” would immediately cause WordPress to be inoperable in certain situations where key files have been modified, so they often need to be checked one-by-one. I appreciate that’s not the case here as we know why all the files have been created.

    When manually deleting from your file manager, or bulk deleting files matching that name using command line, if you should have a php.ini file on your new host, you’ll usually find it in the root directory. However, not all hosts will support or require one there. The wp-admin/php.ini will most likely scan as a non-core file again if you kept it.

    Thanks,
    Peter.

    Thread Starter lunallycha

    (@lunallycha)

    Thank you for your help Peter @wfpeter. I understand why I can’t bulk delete but is there any way to at least see all the files? As you predicted, Wordfence still flags the wp-admin/php.ini and says there are other files but I’m unable to see which ones. I’m hoping they are php.ini that I haven’t deleted yet and not a different issue.

    • This reply was modified 2 years, 2 months ago by lunallycha.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Delete multiple php.ini files’ is closed to new replies.