Unable to create directory wp-content in WordPress in a windows server 2016

I had a similar issue with a Google Cloud Engine Instance, with no cPanel, no phpMyAdmin and FTP, on Ubuntu and Apache. And I solved this way:

1. Define upload folders on wp-config.php

Open wp-config.php with nano or vim and add the following code

define( 'UPLOADS', 'wp-content/uploads' );

before this line:

require_once(ABSPATH . 'wp-settings.php');

and save it.

2. Change owner

Change to wp-content directory. In my case (use your own path):

cd /var/www/html/wp-content

Next, change the owner to www-data

chown -R www-data:www-data plugins

Why www-data? In my case, is the name of the apache service account running on my server. You can check the name with:

ps aux | egrep '(apache|httpd)'

that comand returns some like this:

www-data  5441  0.0  5.8 566184 34896 ?        S    06:34   0:00 /usr/sbin/apache2 -k start
www-data  7753  0.0  5.9 566248 35512 ?        S    09:00   0:00 /usr/sbin/apache2 -k start
www-data  9840  0.0  5.7 566160 34320 ?        S    11:21   0:00 /usr/sbin/apache2 -k start
www-data 21068  0.0  6.2 564032 37192 ?        S    18:22   0:00 /usr/sbin/apache2 -k start
www-data 21069  0.0  6.0 563692 35636 ?        S    18:22   0:00 /usr/sbin/apache2 -k start
root     21455  0.0  0.1  13208  1036 pts/1    S+   18:44   0:00 grep -E --color=auto (apache|httpd)
root     31982  0.0  1.1 485904  6872 ?        Ss   Jan03   0:18 /usr/sbin/apache2 -k start

as you see, root and www-data. Maybe with windows server the account will be different (tasklist? pslist?), i don't know how to get it (I never used windows server, sorry). I Hope www-data works for you.

Finally, make sure uploads folder had the right permissions

chmod 755 -R uploads

3. Grant to that user rights to use Wordpress

To html or public_html folder (in my case /var/www/html, change it for your own path)

chown -R www-data /var/www/html

And voilà. I hope this little guide was useful, or at least, give you ideas to solve it!


One possible issue is your chmod settings for folder wp-content. You may need to change chmod for the wp-content or it's parent directory to allow the creation of any folder/file and child folder/file within that directory.

Depending on which windows application you are using to set the chmod, would determine how this process is undertaken. I use FileZilla and you can simply -

Right Click on wp-content, select File Attributes, and set Numeric value: 755.

FileZilla set cdmod

In addition, have you considered using a third-party webserver like XAMPP?