Question

How to solve this problem of image not getting uploaded in wordpress site

Hi

I am trying to upload images in wordpress while writing post. Images not getting uploaded in media.

Error message is something like this:

unable to create directory uploads/2017/01. Is its parent directory writable by the server?

How to solve this issue.

Subscribe
Share

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.

Accepted Answer

I have created this using serverpilot .

@jtittle so what you suggest me to do next?

THe problem of my issue is solved.

@JiteshShah

Was WordPress deployed by a one-click image or did you manually install your stack (i.e. Apache/NGINX, MySQL/MariaDB, PHP/PHP-FPM, etc)?

The error you’re receiving is due to the fact that the user you’re currently running as does not own the directories/files that it’s trying to write to. For example, if you’re running as www-data but the files and directories are owned by root, you won’t be able to write since www-data is not able to modify files owned by root (or any other user).