Convenient way to use wp_filesystem
No, there is not a more convenient way. The thing is, your first example is insecure on the most common hosting systems because the directory will be “owned” by whatever user the webserver itself is running as. Thus, anybody else able to execute code on that same webserver will be able to access it, write … Read more