After WP transfer, unable to upload new content

I’m receiving this error from WP when attempting to upload. Any idea or direction on how to amend this issue? Could this be a permissions issue, if so, how do I go about fixing it?

“Screen Shot 2.png” has failed to upload due to an error Unable to create directory wp-content/uploads/2015/05. Is its parent directory writable by the server?



I’ve solved this by creating folders manualy: uploads > 2015 > 05

And adding them 777 rights (via FTP: right click on file > file permissions): group permissions > check public permissions > check number value = 777 Then: expand to subfolders


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.

To expand on the answer provided by @jesin , what chown does is simply change ownership. The -R tells chown to recursively change ownership of all files & directories in the path specified, starting from the endpoint and ending when there’s nothing more to change.

Using his example,

chown -R www-data:www-data /var/www

… starting with www, all files & directories will now be owned by the user:group www-data. In the event you don’t want www to be owned by this user and group, you could use:

chown -R www-data:www-data /var/www/*

In most cases, I keep the first two directory locations owned by root or another non-privileged user (better option) to prevent directory traversing by other system users.

If you’re hosting your content in another directory, simply swap /var/www/ with the system path you’re using. From the CLI, you can get the full path by using:

echo $PWD

Yes it is a permission issue. Login to your Droplet via SSH as the root user and execute the following command:

chown -R www-data:www-data /var/www

Ok I have solved this …

In the WP Dashboard … go to Settings / Media

After I had transferred my site to a different server, the old location for media files was in there. So just remove the entry so it defaults … and hey presto … it’s fixed.