Wordpress ftp credentials

October 5, 2013 6.4k views
Good day, After the wordpress has been transferred ex another hosting I am required to fill in the FTP credentials each time I want to install plugin. I tried to add define('FS_METHOD', 'direct'); however no result. Although I can access ftp through one of the clients, it seems that ftp credentials received from Digital Ocean are not valid for my wordpress, because I keep receiving error in FTP username and/or passport. Please suggest possible reasons for that and any solution. Many thanks in advance.
6 Answers
Your file permission is wrong. `define('FS_METHOD', 'direct');` is a forces method...

Change `wp-content` folder permission to 0777 and it should work. WordPress uses FTP as a backup to write new files.
Your folder permissions are wrong; but you should NEVER set them @ 777. The most liberal they should ever be is 755.

You can find the solution to your problem, in this thread: How do I enable Wordpress to update itself through its back end?.
I found the way. Now everything works. Thanks!
Hey Pablo,

I've read your other article discussion recursively changing permissions for www-data but I didn't see a final resolve or solution to the matter. Where you all able to figure out if it was necessary to run chown every time or if this was the most secure way to fix the issue? From your last response, it appeared that you didn't think it was a good idea to do this.
I had the same problem and it's solved thanks to this post https://www.digitalocean.com/community/articles/how-to-configure-secure-updates-and-installations-in-wordpress-on-ubuntu.
Have another answer? Share your knowledge.