Unable to create directory wp-content/uploads/2016/03. Is its parent directory writable by the server?

I have set up a droplet running ubuntu 14.04X64 with Sentora Control Panel. Within the sentora control panel, I have created FTP accounts. I uploaded wordpress via FTP and successfully installed on my droplet.

I attempted to upload a theme from my laptop via the wordpress Add Themes uploader. The theme upload is failing and I am getting the error below:

Unable to create directory wp-content/uploads/2016/03. Is its parent directory writable by the server?

I observed the same thing when attempting to install a theme from the wordpress theme repository.

The /wp-content, /wp-content/themes and /wp-content/uploads folder’s permission is originally 755, I changed this to 777 and the theme upload succeeded each time.

What is a more practical way of resolving this issue as file permission 777 is a big security risk and not future proof?


Its all about permissions: You need to add a group, e.g., www or www-data [ These are the common groups in web hosting, but you can choose what ever you want ] root@cubox208:/# useradd apache root@cubox208:/# usermod -a -G www apache root@cubox208:/# chown -R root:www /var/www root@cubox208:/# chmod 2775 /var/www root@cubox208:/# find /var/www -type d -exec chmod 2775 {} + root@cubox208:/# find /var/www -type f -exec chmod 0664 {} + reload your apache & mysql NOTE: We need to make sure the files in /var/www/ have 664 permissions and all directories have 755 permissions. Use sudo if you are not root. Also you can bypass the ftp user credentials while uploading the themes by adding this line at the end of the wp-config file.

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

This is typically an issue with file and directory ownership more often than permissions. Based on the Sentora configuration for your php deployment, verify with a phpinfo page what user the php code is executing as.

Once you know the system user, be sure your ftp account is configured to upload the files as that user. To address the issue as is, typically you will update the ownership of the base path using “chown” to match that user, so that the php execution ( running as that user ) has the permission to read, write and create additional paths under it. The base path being the document root your application is installed at based on the web server configuration.

Hope that helps.

This Tutorial may help you to Solve unable create wordpress directory Thanks