Updating/Installing wordpress themes or plugins without having to enter FTP info

Feb 22nd, 2012 | By | Category: Internet, Linux / Freebsd, wordpress

I first saw this in action when I setup wordpress on a shared host after running it on my dedicated server for years.  All of a sudden when I clicked ‘install’ there was no FTP prompt, the bloody thing just installed!  I was amazed at this new development and looked into how it was done.

Simple enough if you don’t mind editing a file and changing some perms.

  1. First you need to make sure that the wp-content(and plugins and themes) directories are owned by your apache process.. in FreeBSD it’s httpd in linux it’s www-data
  2. Next you should chmod the wp-content, plugins and themes directory to 755.  For some reason WP hates things at 775
  3. Lastly you need to add this little line of code to the bottom of your wp-config.php file:
define('FS_METHOD', 'direct');
And that does it, from now on no more ftp credentials.. Huzzah!


Tags: , , , , ,

Leave a Comment