Getting rid of unused php files

I am looking to delete php files that are no longer used on my site. I can use something like get_included_files to display the included files, but that would mean that I would have to put it on every child page. If I put it on the parent page, it will not show me the child page that called it.

Does anyone else face a similar situation? If so, what did you do to remove unused php files?

+3
source share
4 answers

The best and most effective way is to manually view all the files and choose which ones are no longer in use. Thus, you delete all those that you do not need, and do not accidentally delete them that you still need. You really should not rely on an automated process for something like this.

+1
source

We hope you put files that do not interact with browsers in your own directory. If so, then it is relatively easy to use grepto find out what still includes or requires them.

, , , . , HTML, .

. , , , .

0

animuson , /, , , , "". . apc cache ttl 0 , () /. .
, , . nWire. , / apc , , , , , ///.

0

, , - . , script , , -, . , . , , . (, , Sitemap , ), script , .

Other ways to do this other than boot php for this is to use the apache module, I hope this gives you some ideas.

0
source

Source: https://habr.com/ru/post/1737213/


All Articles