Question

Configuring passive FTP so Wordpress can update plugins

Posted March 12, 2013 5.2k views
I am looking for the best way to configure passive FTP on using VSFTPD on Ubuntu 12.10 + Nginx. My goal is to enable Wordpress to update plugins and write files.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

3 answers
You don't really need to configure Passive FTP to allow WordPress to update core or install / update plugins, you simply need to run PHP as the owner of the files so that it has access to read and write to files and folders without giving world-writable permissions. This would be the easiest method.

You can go the FTP route, though you'll be adding more configuration to the wp-config.php file which is really clutter and using the above will allow you to simplify things quite a bit and prevent from having to CHMOD folders due to plugin requirements as many plugins need the ability to write, though world-writable (i.e. CHMOD 777 or 666 for files) is a no-no in most cases. Using the owner of the files, you can write to folders with CHMOD 755 and files with 644 without any issues.
how would you go about doing this? I too am in the same boat. I need to be able to update the site from inside wordpress.
To change files / directories recursively in debian / ubuntu:
Files: chmod 644 $(find REPLACE-WITH-YOUR-DIRECTORY-HERE -type f)
Directories: chmod 755 $(find REPLACE-WITH-YOUR-DIRECTORY-HERE -type d)
Submit an Answer