: There are two ways to do this, both of which are a bit tedious. Method #1: Search the code Use a tool to do a text search throughout all of your code for each file name. (Just the
There are two ways to do this, both of which are a bit tedious.
Method #1 : Search the code
Use a tool to do a text search throughout all of your code for each file name. (Just the file name, not the path! Relative paths are often used.) Then, make a determination for each instance whether or not that file is in use. This is a real hassle, but important.
Method #2 : Analyze server logs
Run a crawler on all of your pages. Check your server's access log. Write a script to (or manually) search through that log for each file name in your source tree to see if it was accessed. Danger Will Robinson, as this will not catch included files! This is only useful for resources loaded client side, such as CSS, JS, and images. Also beware of minification that hide that these files are in use.
Finally, when you are all done, be sure to check error logs and what not to see if you broke anything. Make backups (and/or version control!) as you go.
More posts by @Cofer257
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.