Configuring passive FTP so Wordpress can update plugins

March 12, 2013 2.6k 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.
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)
Have another answer? Share your knowledge.