I have installed several local versions of Wordpress for development purposes.

After the install I can create posts, pages and edit admin options.

However as soon as try to upload images which would be saved in wp_content/uploads I get an error:

Upload Error: Unable to create directory ...../blog/wp-content/uploads/2011/05. Is its parent directory writable by the server?

Looks like MAMP server runs as user _www The blog directory is owned by User1 and the group User1 _www is not in the User1 group, should it be? I do not want to chmod 777 or 765 on the directories just to get it going. Googled up a couple of references:

http://codex.wordpress.org/Changing_File_Permissions in "Permission Scheme for WordPress"

All files should be owned by your user (ftp) account on your web server, and should be writable by that account. On shared hosts, files should never be owned by the webserver process itself (sometimes this is www, or apache, or nobody user).

Any file that needs write access from WordPress should be owned or group-owned by the user account used by the WordPress (which may be different than the server account). For example, you may have a user account that lets you FTP files back and forth to your server, but your server itself may run using a separate user, in a separate usergroup, such as dhapache or nobody. If WordPress is running as the FTP account, that account needs to have write access, i.e., be the owner of the files, or belong to a group that has write access. In the latter case, that would mean permissions are set more permissively than default (for example, 775 rather than 755 for folders, and 664 instead of 644).

User and group are User1 (which is admin). Running "ps aux | grep httpd" is running as _www So I think this means Wordpress is running as user _www. So the advice seems contradictory: "files should never be owned by the webserver process" i.e. _www but then later it says "Any file that needs write access from WordPress should be owned or group-owned by the user account used by the WordPress" So isn't this _www again?

Another search found this url http://dancingengineer.com/computing/2009/07/how-to-install-wordpress-on-mac-os-x-leopard States Which says:

My preferred way to do this is to change the group of the wordpress directory and its contents to _www and give write permissions to the group. Keep the owner as your "username".

$ cd /Users/"username"/Sites

$ sudo chown -R username:_www wordpress_directory

$ sudo chmod -R g+w wordpress_directory

However, when I tried this, it did not work for automatic upgrades to newer versions of WordPress although it worked for automatically updating the .htaccess file for pretty permalinks.

It is not entirely clear to me what should be done. This last suggestion seems to be saying change the group from User1 to _www and give the group write access, but Wordpress upgrades won't work.

Is this the right solution?
I would have thought there would be a clear way to set this up on OS X 10.6?

Be great if there was a plugin that could run a script for each of the main OS's that Wordpress runs on.


Your question is a bit hard to follow, but I'll try to help anyway:

  1. First, you can run MAMP as either "www/mysql" or "user/user". What you choose depends on what you want and where you've placed your files. If you're not exposing your web server to the outside world, then user/user is probably easiest although not as secure.

  2. Second, the auto-upgrades/plugins/themes are downloaded to your site via FTP and since MOST people neither run a FTP Server on their local machines nor have a static IP or domain name to address their local machine they won't work, so install and upgrade manually. Yes, you could setup an FTP server on your workstation and use a DynDNS service and forward the FTP port through your router and firewall to you workstation, but really it's probably not worth it.

  3. Third, the media uploader doesn't use FTP so it SHOULD still work on a local install unlike plugins, upgrades and themes. Yours probably isn't working because the ownership or permissions are not set correctly for /wp-content. This could be that you're running the web server as "_www/_mysql" and "_www" doesn't have permissions to where ever the folder you've stored your files is OR it could be that the RWX permissions are not set correctly on the folder.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.