Fixing WordPress’ Auto-Update (WordPress 3.3.1 on CentOS Linux)
Having trouble with WordPress’ auto update feature? Confronting errors like “could not copy file…” or is WordPress asking for FTP information?
Your problem is most likely server permissions. If you have shell access to your own VPS/dedicated server, use the lines below. If you’re using a shared hosting setup, try option #4 below, or contact your administrator for help.
Option #1: chmod 777
Sure, you could CHMOD 777 your whole site. That would technically work, but it’s switching permissions whenever you need to update is inconvenient. And, leaving permissions this way leaves you open to a whole host of security issues.
chmod -R 777 <path-to-wordpress-dir>(Not Secure!)
Option #2: apache file permission
This gives apache full permissions. This works, but if you use FTP, users no longer have permissions to write files. No good! I want my FTP access intact.
chown -R apache:apache <path-to-wordpress-dir>(No FTP!)
Option #3: apache /w group permissions
I created a “wordpress” group and added my FTP users to it and gave the wp-content directory group write permissions. It’s a bit of a compromise, but it worked for me.
groupadd wordpress useradd -G wordpress <your-username> chmod -R 775 <path-to-wordpress-dir>/wp-content/ chown -R apache:wordpress <path-to-wordpress-dir>
Option #4: wp-config constants
Another option for those who are unable to change file permissions, and/or have a relatively new version of WordPress, is to bypass entering FTP information by defining your FTP info in your wp-config.php file. More information can be found in the WordPress codex.
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.example.org');

I’m a frontend designer/web designer/graphic designer/regular guy with an insane curiosity for web design, typography, and the art of visual communications. I love to write, and do so in the
Thanks for the write-up. Will have to look into option 3 on our end. Just a note that I went to print this page and noticed the styles were whacked (media=“screen”). I was able to inspect the style node and change the media to “all” and got a good print. I recommend you make this change for others who might come along. Thanks, Brad =)
thanks a bunch, option 3 worked for me. is it secure though?
you’re in point of fact a just right webmaster. The website loading speed is amazing. It seems that you are doing any distinctive trick. In addition, The contents are masterwork. you have done a wonderful job on this subject!