Jonathan Lahijani Posted January 7, 2020 Share Posted January 7, 2020 I need to run the PW's FileCompiler in a script to rebuild the entirety of the FileCompiler contents folder. While I can do this by simply visiting a page on my site, I need to automate it as part of a cleanup script I have. What is the correct way to approach this? Link to comment Share on other sites More sharing options...
elabx Posted January 8, 2020 Share Posted January 8, 2020 I think this should work?? https://github.com/processwire/processwire/blob/51629cdd5f381d3881133baf83e1bd2d9306f867/wire/modules/Process/ProcessModule/ProcessModule.module#L315 $compiler = new FileCompiler($this->wire('config')->paths->siteModules); $compiler->clearCache(true); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now