I've installed WordPress on my local machine with MAMP. If I want to updates the system or plugins, WordPress asks for WebFTP credentials every time. I've tried root/root on localhost and localost:8888. Both are wrong?
Where can I find/set these credentials? Or is there a way to prevent WP from asking?
The issue is new for me. In the past there was no need for WebFTP credentials?!
I've always told WordPress to edit files directly for updating WordPress instead of using FTP. To do that add define('FS_METHOD', 'direct');
to your wp-config.php file and then make sure that the files are owned by the user that runs Apache. I think that by default the free version of MAMP runs as you so you shouldn't need to do anything different with file permissions.
Below is the documentation from WP's Editing wp-config.php documentation page for FS_METHOD
constant.
FS_METHOD forces the filesystem method. It should only be "direct", "ssh2", "ftpext", or "ftpsockets". Generally, you should only change this if you are experiencing update problems. If you change it and it doesn't help, change it back/remove it. Under most circumstances, setting it to 'ftpsockets' will work if the automatically chosen method does not. Note that your selection here has serious security implications. If you are not familiar with them, you should seek help before making a change.
**(Primary Preference) "direct"** forces it to use Direct File I/O requests from within PHP. It is the option chosen by default. **(Secondary Preference) "ssh2"** is to force the usage of the SSH PHP Extension if installed **(3rd Preference) "ftpext"** is to force the usage of the FTP PHP Extension for FTP Access, and finally **(4th Preference) "ftpsockets"** utilises the PHP Sockets Class for FTP Access.