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

2 Answers 2


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)

  • Doesn't config need to be 600?
    – o_O
    Dec 7, 2017 at 16:54
  • 1
    It doesn't need to be. After all is said and done and the site is live you could change it to that for security. But it certainly dissent need to.
    – rudtek
    Dec 7, 2017 at 18:01

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.