When I try to install a theme, I get this error message:

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

I am not expert on Wordpress. Can you please let me know what exactly needs to be done so that the thing works?

I've followed this tutorial to set up the servers and wordpress: https://www.youtube.com/watch?v=8Uofkq718n8

As you can see - it uses Ubuntu (I also have ubuntu user to connect with EC2 instance on AWS). But it seems some access rights are missing. What is the best way to set up everything? for WP theme installation? is this a normal issue? Should I use ubuntu user or some other user (which one?) to set up the access rights? Is this what needs to be done?

  • I watched the video at 2x speed and saw that WP got installed/copied over as a root user, so of course Apache and PHP can't modify those folders! WWW user is not allowed to modify root users stuff. This is a general ownership problem not a WordPress problem, and you would have the same issues if you uploaded a standalone PHP script that tried to write a file
    – Tom J Nowell
    Mar 14 at 15:56
  • @TomJNowell: thanks for your reply and your time. Do you think the approach described in the video is wrong? Do you know a better approach and if so can you please share a tutorial. Or do you perhaps have an idea how to fix the issue? Please be specific (I am not WP or infra expert). Thanks!
    – Dantes
    Mar 14 at 16:49
  • the video does not cover everything there is to cover in setting up a WP host. That is all I will say though, your question was closed! This isn't an appropriate place to ask for recommendations!
    – Tom J Nowell
    Mar 14 at 17:28