I want to deploy a magento site. But firstly I need to clear temp/cache files from magento directory as well as database.
I don't know how to do both by a single script.
Note :- Need to remove only temp files from directory and database.
Well you need to look at my gist here, it contains code for clearing the log, cache and temp in both files and database.
Download it from:
https://gist.github.com/VIVEKLUCKY1848/19d4b2853dad7e802b33c24199ab65f4
Hope this works for you