0

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 so for each operation. They aren't stored persistently."

Where does wordpress store the FTP credentials?

If this is still true, I'm guessing that the interaction between WordPress and the host would be that the host would send the default (main) FTP credentials unless a specific account were added to wp-config.

1

Not quite right. WordPress only requests FTP credentials if it cannot modify files. That's the important bit from Rarst's reply. This all comes down to who owns the files and does php (and WordPress) have access via either the group and/or user to modify these files?

The default is to use php's filesystem extension which does not require FTP at all. In the case of using FTP, credentials would always need to be set either within the WordPress admin for each request or in wp-config.php.

Here's a good overview of what's going on: What security concerns should I have when setting FS_METHOD to "direct" in wp-config?

The codex for FS_METHOD lists the different options for WordPress interacting with the file system.

To answer your question, nothing has changed with regards to the way WordPress interacts with the filesystem with regards to FTP.

Hope that helps!

  • 1
    It's always instructive when someone answers the real question, even if it's not the question asked. – Nora McDougall-Collins Feb 21 at 17:32
  • Your answer prompts a clarification question: in the case where WordPress cannot modify files, does it request the FTP credentials from the server or from the administrator in the form of data input? – Nora McDougall-Collins Feb 21 at 20:39
  • The page prompts the administrator with a form to fill in the ftp details. For example, when updating plugins the form looks like this: files.copper-note.com/myEtslV – MikeNGarrett Feb 21 at 22:53
  • I've found in practice that creating new files typically requires using the WP Filesystem whereas modifying existing files does not (as the owner/group permissions are already set.) see this note: ottopress.com/2011/tutorial-using-the-wp_filesystem/… – majick Feb 22 at 6:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.