Updating WordPress from Admin area with MAMP
I do all my development and testing locally on a Mac running OS X Lion and MAMP Pro. One annoying thing is you get the nice little WordPress update notification for plugins/themes or the core and you can’t do it! Well now you can!
Open up your wp-config.php and add the following line.
define('FS_METHOD', 'direct');
Now you need to get your permissions correct for this so assuming you have your site installed into /Users/username/Sites/wordpress open up a terminal and type the following:
cd /Users/username/Sites/wordpress
sudo chown -R :_www ./*
sudo chmod -R g+w ./*
This basically gives you www user permission to write and make changes as well as makes your wordpress directory writable by that user (obviously this is only for local testing!)
After all that you should be able to just hit update in the WordPress dashboard, you won’t see the normal FTP details prompt!
Excuse the line breaks at the end of each line in the code examples my code highlighter is going a little bit crazy for some reason!
Filed under Developer. No comments, on purpose.