wplib-box
wplib-box copied to clipboard
Add process/background task to validate project
I just wasted 20+ minutes trying to figure out why a site was generated 500 errors. Turns out the directories had 700 permissions instead of 755. Seems like we could set up a process to verify this and proactively let the developer know there is a problem rather than force the developer to figure out themselves.
We of course can validate a project when our box command creates or imports a project, but if the developer adds WPLib Box to an existing project, or creates the files and directories themselves then it would be good to verify them on a schedule task.
Which makes me think adding a .box directory where we can store files would be helpful, such as a file to designate the last time we validated the project. That way we could validate using a task scheduled once per a minute, but only actual validate ever hour or every day, depending on how frequently we determine validation would be helpful.
That said, we could also validate with a file watcher.
Lastly, this also means we'll need at least one method to provide users with notifications. See #263.