I recently got the following error while uploading media to my wordpress site:
Unable to create directory uploads/2016/06. Is its parent directory writable by the server?
Here are the steps to fix the issue:
- Possible Issue 1: Incorrect Directory pointed to in the settings:
- Open your WordPress Admin page (this is usually at /wp-admin)
- Hover over the sidebar menu “Settings” and then click on “Media“
- Check the section “Uploading Files“(If this section is missing then try the next solution)
- check the value for “Store Uploads in This Folder“
- Most commonly the value should be “wp-content/uploads“, if not is should be pointing to the correct folder on the server. My setup had it pointing to the wrong directory with the wrong permissions.
- Possible Issue 2: Wrong permissions
- Login to your server via ssh or ftp
- Traverse to the installation folder of the WordPress site
- Check and see if the user:group settings are correct (Usually for UNIX systems its www-data:www-data)
- If that is fine look at the permissions for the ‘uploads‘ directory and its sub directories
- running a command ‘ls -l uploads‘, will give you the permissions set
- The ideal permission is of 755. For this run the command “chmod -r 755 uploads“
Hopefully that will solve your problems.