What permissions does wp-content/uploads need?

What is the default wp-content/uploads directory permission? What chmod command do I need to set it correctly?

Solutions Collecting From Web of "What permissions does wp-content/uploads need?"

You’ll want directories to have 755 and files to have 644.
you can navigate to your www directory and use these 2 commands:

find . -type d -print0 | xargs -0 chmod 0755 # For directories


find . -type f -print0 | xargs -0 chmod 0644 # For files

(Obviously don’t input the # or anything after it when using the above 2 commands)

You can find a full list of recommended file and folder permissions on the codex at: https://codex.wordpress.org/Changing_File_Permissions See the section entitled “Using the Command Line” for chmod commands.

Otherwise, if you don’t have shell access, you can also change permissions from an FTP client (outlined in codex page) or from the hosting provider’s Cpanel > File Manager. (see https://www.siteground.com/tutorials/cpanel/file-permissions/ for how to edit file/folder permissions in File Manager within CPanel)

In addition to the permission levels, you may need to check owner/group assigned to each file/folder.

  • If you’re on a shared hosting solution, chances are the default user account created for your CPanel access or similar web interface will have the proper group assignments when uploading files to run your WordPress website.

  • If you are on a more custom hosting package using root access, you will more than likely need to update the file/folder owner & group attributes (since the default apache user/www user is not the “root” account). Here’s a link to a blog post with steps to determine what user apache is running as: https://www.cyberciti.biz/faq/unix-osx-linux-find-apache-user/
    Once you determine the user/group that apache runs as, you may need to use the chown command to recursively update owner/group to files/folders.