Multiple php.ini in various locations

My security plugin has been warning me about multiple php.ini files located in various locations (eg. public\_html/wp-admin/css/php.ini). They appear to have been placed there by my previous host, IONOS.

I have moved to a different host and they’ve confirmed I shouldn’t need so many php.ini. So I want to try and delete all those files but the plugin only lets me delete one at a time and then I have to run a scan again (there are 200 files in total).

Now I think I’ve come up with a solution but I haven’t got a lot of experience so I’d like to double check before deleting anything. Am I right to assume I need to locate the only php.ini that is needed, which I think is /public\_html/wp-admin/php.ini, and then manually delete all other php.ini in cPanel file manager? There is also another one in /public\_html/php.ini, and literally in every folder and subfolder of /wp-admin.

2 Comments
  1. Do you have ssh access? That would be an easy way to go about it.

    `find /public_html/*/* -name “php.ini” -type f -delete` should work. Make sure you backup the one in /public_html/ first just in case it deletes that and you have to re-upload it.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer