Questions tagged [filesystem-api]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
25 views

Does WordPress still ask for FTP credentials for each file operation?

There is a reply from 2014, that is a great answer to a question I have, but WordPress changes, and I'm wondering if this is still true, "WP Filesystem API will ask for FTP credentials, but it will do ...
0
votes
0answers
20 views

Moving large files between WordPress installs

What method would be most compatible for most WordPress installs, to transfer a large file [up to 100GB] between one WordPress install [client] to another [host]. Assume total control over [host] but [...
2
votes
1answer
560 views

How to append_contents using WP_Filesystem?

I have scenario that appends the contents into the files, I was using normal file system function of PHP Now I have decided to use WordPress WP_Filesystem but I cannot see any methods of it which do ...
0
votes
1answer
403 views

Right way to download file from source to destination

I'm trying to download a file from one location to another. The code is working perfect. Here is the code snippet: Helper Function - Create directory in /uploads/{$dir_name}/ and return paths. /** *...
0
votes
1answer
152 views

Should I use Filesystem API for reading files or listing directories?

I know that i should use Filesystem API to write files and I understand why but is there any difference if I read file with wp_filesystem or plain PHP? And what about listing directories? Consider ...
6
votes
1answer
840 views

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

I was in the process checking some of my existing plugins for any unsafe filesystem accesses, when I ran across WP_Image_Editor's save function, which calls _save, which finally calls make_image (...
3
votes
1answer
938 views

How to set path with WP_Filesystem and ftp base / chroot

In my theme i will use the WP_Filesystem to write a file to for example: $file = get_template_directory().'/library/assets/css/wpless2css.css'; Which outputs something like /home/user/domain/...
1
vote
0answers
324 views

Is there function similar to wp_upload_bits() that will allow uploading to a specific path?

wp_upload_bits() allows you to put arbitrary binary data into a file, but it selects the path where the file is placed and doesn't allow configuration of this destination besides the basename. There'...