The Issue: No WordPress updates on localhost

If you’re using a tool like MAMP or XAMP (etc.) to locally host development WordPress sites, you may have noticed you can’t run regular updates on the WordPress core, and can’t install plug-ins and themes from the repository. Quite likely WordPress is prompting you for FTP credentials, and it might also give an error related to not being able to create a directory, etc.

There are two issues. When is the FTP issue, the other is the permission issues.


FTP error

Wordpress connection information

If, whilst attempting to update your localhost WordPress, you get a message requesting FTP credentials (like the one above), you need to add the following to your wp-config.php file.

Just put it somewhere near the top of the file.

Permissions error

Wordpress permissions error

If the WordPress install/update system looks like it’s working but then reports some that it can’t create a folder, or something to that effect (see the above image), your system likely has a permissions error.

On Mac OS X it’s normally the case that Apache runs under the username _www . But MAMP (etc.) leave typically have your username (if that’s the one you used to run it) as the owner of the files. You’ll need to change the user to _www . Use these commands at the command line (in or iTerm, or what ever command line interface you like to use).

So, you need to change directory to the parent folder of your WordPress installation. You are then changing the owner and permissions on the WordPress installation folder (I’ve used wp-dir  in my example, and you’ll need to replace that with your WP installation folder name).

Under normal circumstances, you should now be able to run updates and installs on your local WordPress instance.

Wordpress permissions error