Enable automatic update of WordPress and skip FTP details

I want to use the automatic update of WordPress which seems to work fine on hosting services but not on my local installation.

I try to solve it by doing chmod -R 777 on the installation, but that does not do the trick on its own.

Adding a row like this to wp-config.php however does the trick.


An explanation of why it is like this, was found in this excellent StackOverflow response.