How to append_contents using WP_Filesystem?

WP_Filesystem abstraction is primarily meant for performing plugin/theme/core updates, especially in environments with restricted writes. As such it doesn’t really implement full range of possible file operations, as you noted there is no ability to write to the end of file in declared API. More so some possible implementations (depending on file system) might not … Read more

How to set path with WP_Filesystem and ftp base / chroot

After changing FTP_BASE in my wp-config i found the update function of WP broken. Then i realize the update function work the same way and don’t need any additional settings. In wp-admin/includes/update-core.php i found the usage of $wp_filesystem->wp_content_dir(). This solves my problem too. On http://xref.wordpress.org/branches/3.8/WordPress/Filesystem/WP_Filesystem_Base.html you will find a list of possible useful functions: string … Read more

Why doesn’t WP_Image_Editor save images using the Filesystem API?

Directly accessing the filesystem for writing is evil… for most of the cases where people are actually doing that. If you’re editing an image file, and it is in the wp-content/uploads directory, then you know, whatever. That’s not the common case. Plugins and themes don’t typically do that because they don’t have to do that. … Read more