Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Copa WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Como corrigir o erro de permissões de arquivos e pastas no WordPress

Se o seu site tiver muitos arquivos e mídias, como o WPBeginner, você precisará aprender a gerenciar corretamente as permissões de arquivos e pastas. Pode haver ocasiões em que você encontre erros relacionados a essas permissões, o que pode prejudicar a funcionalidade do seu site.

Por exemplo, você pode descobrir que não consegue fazer upload de imagens para a biblioteca de mídia ou que determinados scripts não estão sendo executados corretamente. Descobrimos que esses problemas geralmente decorrem de permissões incorretas de arquivos e pastas.

Neste artigo, mostraremos como corrigir rapidamente o erro de permissões de arquivos e pastas no WordPress.

Fix file and folder permissions in WordPress

Como funcionam as permissões de arquivos e pastas no WordPress?

As permissões de arquivos e pastas no WordPress controlam quem pode ler, executar ou modificar os arquivos do seu site. Sua empresa de hospedagem na Web do WordPress usa um software especial, como o Apache, para gerenciar e exibir esses arquivos nos navegadores.

Essas permissões são essenciais para que o WordPress manipule arquivos, crie pastas e execute tarefas no servidor.

Se as permissões de arquivo do WordPress forem definidas incorretamente, isso pode impedir que o software principal faça coisas como criar pastas, fazer upload de imagens ou executar scripts. As permissões incorretas também ameaçam a segurança do WordPress.

Quando as permissões estão erradas, o WordPress geralmente o alerta sobre problemas como a impossibilidade de editar arquivos ou criar pastas. No entanto, às vezes, você pode não ver mensagens de erro específicas.

Quais são as permissões corretas de arquivos e pastas no WordPress?

As configurações corretas de permissão de arquivos e pastas permitem que o WordPress crie pastas e arquivos. Aqui estão as permissões de arquivo recomendadas para a maioria dos usuários:

  • 755 para todas as pastas e subpastas. Isso permite que o proprietário do site leia, grave e execute pastas.
  • 644 para todos os arquivos. Isso permite que o proprietário do site leia e grave arquivos, enquanto outros podem apenas lê-los.

Dito isso, vamos dar uma olhada em como alterar facilmente as permissões de arquivo do WordPress e corrigir o erro. Temos dois métodos, e você pode usar os links rápidos abaixo para pular para o método de sua preferência:

Sem tempo para corrigir erros do WordPress? O WPBeginner Pro Services oferece soluções para sites hackeados do WordPress, suporte de emergência e até mesmo manutenção completa para evitar que os erros ocorram em primeiro lugar.

Marque uma reunião com nossos especialistas hoje mesmo para encontrar a solução certa para seu site!

Método 1: Corrigir as permissões de arquivos do WordPress com um plug-in gratuito

A correção dos problemas de permissões de arquivos e pastas do WordPress geralmente envolve o uso de um cliente FTP. Se você estiver confiante em resolver esse erro manualmente, poderá pular para o segundo método.

Caso contrário, você pode usar esse método de plug-in com o plug-in All-in-One Security. Esse plugin tem um recurso para alterar as permissões de arquivos e pastas do WordPress com apenas alguns cliques.

Este tutorial usará a versão gratuita do plug-in, mas fique à vontade para usar a versão paga para obter recursos mais avançados. Para obter mais informações, leia nossa análise do All-in-One Security.

Primeiro, instale o plug-in All-in-One Security no WordPress. Para obter mais informações, consulte nosso guia passo a passo sobre como instalar um plug-in do WordPress.

Depois disso, vá para WP Security “ File Security. Em seguida, navegue até a guia “File Permissions” (Permissões de arquivo).

All in One Security's File Security feature

Aqui, o plug-in examinará as pastas e os arquivos essenciais do WordPress e destacará as configurações de permissão que não são seguras.

Se o plug-in encontrar uma pasta ou arquivo com erros de permissão, a coluna “Ação recomendada” terá um botão chamado “Definir permissões recomendadas”.

Para corrigi-lo, basta clicar nele e o plug-in usará as permissões corretas de arquivo ou pasta do WordPress.

Setting the recommended file and folder permissions in All in One Security

Depois disso, a coluna “Ação recomendada” deve ser alterada para “Nenhuma ação necessária”.

Método 2: Corrigir manualmente as permissões do WordPress para arquivos e pastas

Primeiro, você precisará se conectar ao seu site WordPress usando um cliente FTP como o FileZilla ou o aplicativo File Manager no cPanel. Depois de conectado, basta acessar a pasta raiz do seu site WordPress.

Depois disso, você deve selecionar todas as pastas do WordPress no diretório raiz e, em seguida, clicar com o botão direito do mouse para selecionar “File permissions” (Permissões de arquivo).

File permissions in FTP

Isso fará com que a caixa de diálogo de permissões de arquivo seja exibida.

Agora, você precisa digitar “755” no campo de valor numérico. Depois disso, você deve clicar na caixa de seleção “Recurse into subdirectories” e, em seguida, selecionar a opção “Apply to directories only”.

Fixing folder permissions in WordPress

Clique no botão “OK” para continuar. Seu cliente FTP começará a definir permissões para pastas e subpastas. Você precisará aguardar a conclusão.

Em seguida, você precisa selecionar todos os arquivos e pastas na pasta raiz do seu site WordPress e, em seguida, clicar com o botão direito do mouse para selecionar “File permissions” (Permissões de arquivo).

Setting permissions for all files

A caixa de diálogo de permissões de arquivo será exibida.

Desta vez, você precisa digitar “644” na caixa “Valor numérico”. Depois disso, basta clicar na caixa de seleção “Recurse into subdirectories” e, em seguida, selecionar a opção “Apply to files only”.

Setting permissions for files in WordPress

Clique em “OK” para continuar.

Seu cliente FTP começará a definir as permissões de todos os arquivos do seu site WordPress.

Se esse método não funcionar, recomendamos que entre em contato com o provedor de hospedagem. Pode haver um erro do lado deles e eles poderão ajudá-lo. Leia nosso guia sobre como solicitar corretamente o suporte do WordPress para obter mais dicas.

Para saber mais sobre os arquivos do WordPress, consulte nosso guia para iniciantes sobre arquivos e diretórios do WordPress.

Saiba mais maneiras de solucionar erros do WordPress

Está enfrentando outros tipos de erros em seu site WordPress? Confira estes guias para corrigir o problema e manter seu site funcionando sem problemas:

Esperamos que este artigo tenha ajudado você a corrigir o erro de permissões de arquivos e pastas no WordPress. Talvez você também queira ver nosso guia sobre como corrigir erros comuns do WordPress e conferir nossas principais opções dos melhores plug-ins do WordPress para expandir seu site.

Se você gostou deste artigo, inscreva-se em nosso canal do YouTube para receber tutoriais em vídeo sobre o WordPress. Você também pode nos encontrar no Twitter e no Facebook.

Divulgação: Nosso conteúdo é apoiado pelo leitor. Isso significa que, se você clicar em alguns de nossos links, poderemos receber uma comissão. Veja como o WPBeginner é financiado, por que isso é importante e como você pode nos apoiar. Aqui está nosso processo editorial.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

O kit de ferramentas definitivo WordPress

Obtenha acesso GRATUITO ao nosso kit de ferramentas - uma coleção de produtos e recursos relacionados ao WordPress que todo profissional deve ter!

Reader Interactions

69 ComentáriosDeixe uma resposta

  1. Unarine Leo Netshifhefhe

    I searched around for other articles and I found this other article which mentioned something about using chmod, it qoutes the following “If you are looking to change the permission for the wp-config.php file, you can use the following command for the suggested change as cited earlier –
    chmod 600 wp-config.php”, so I would like to know if this is advisable and where can I find the command line?

    • WPBeginner Support

      That is mainly a different way to do what we cover in the article and is not always a beginner friendly method.

      Administrador

  2. Unarine Leo Netshifhefhe

    I have a problem with my file manager there’s a folder which isnt either 644 nor 755, it is 600 and whenever I try to change it, I get an error alert saying that permission operation failed, how can i solve that?

    • WPBeginner Support

      You would want to reach out to your hosting provider and they should be able to assist you with the permissions issue.

      Administrador

  3. Boris

    Hi, great article. Just to confirm, I understand step 1 ” you must select all folders in the root directory” and then its the next step that I’m no sure about: “Next, you need to select all files and folders in the root folder of your WordPress site…” So that would be the folder: “Public_Html? Because that’s where the folders I see in your screenshot reside. And your not selecting all the folders again under the root directory as in step 1 right?

    Thanks and best regards

    • WPBeginner Support

      It depends on your host but in the folders selected you would want to see wp-admin, wp-content, and wp-includes to make sure you are in the correct location.

      Administrador

  4. MBarbz

    This actually worked with the step one (Permissions and 777). For some reason i wasn’t able to delete two folders from the “Upload”-Folder and then it worked. For some reason i had to re-start Filezilla because it was getting frozen but it worked out. Thanks.

    • WPBeginner Support

      Glad our guide was able to help!

      Administrador

  5. Awais

    Hi,
    Thank you so much for this guide, it helped me to fix my issue. awesome!!

    • WPBeginner Support

      Glad our guide was helpful :)

      Administrador

  6. Shahid

    Thank you …. I set the folder permission to 755 and error was gone

    • WPBeginner Support

      Glad our guide was helpful :)

      Administrador

  7. Tracy

    Is there a reason why it is recommended to use an FTP client to manage user permission instead of managing them in the C-panel?

    • WPBeginner Support

      Not all hosting providers offer cpanel access :)

      Administrador

      • Tracy

        Thank you very much. This tutorial was extremely helpful.

        • WPBeginner Support

          Glad our guide was helpful!

  8. Stegemüller

    I was struggling for many hours and could not understand what had happend. I found this guide and followed every step. Now both my main domain and subdomain are working again. Thank you VERY much.

    • WPBeginner Support

      Glad our guide was helpful :)

      Administrador

  9. John

    Thanks very much. I messed up permissions and your instructions fixed up everything.

    • WPBeginner Support

      Glad our guide was able to help :)

      Administrador

  10. Max

    Could you tell me what FTP program your using, so the instructions are easier to follow. as most programs don’t use the same terminology it seems.

    • WPBeginner Support

      The specific one used should be Filezilla

      Administrador

  11. Adam

    I have followed the article and still getting the error please help

    • WPBeginner Support

      If you are still receiving the error, you would want to reach out to your hosting provider and they should be able to assist.

      Administrador

  12. Nicole

    I’ve been searching like crazy and still can’t find my answer. Any idea what’s going on? When I follow the directions to right click and look for “File Permissions”, I don’t have that option. So I’m stuck and still can’t upload images anymore :(
    Any advice would be much appreciated.

    • WPBeginner Support

      If you can’t see the folder permissions, we would recommend reaching out to your hosting provider and they should be able to assist.

      Administrador

  13. Andy

    Thanks so much! Worked great.

    • WPBeginner Support

      Glad our guide could help you :)

      Administrador

  14. Jun

    Hello, I followed this article, but I can’t connect to my website after changing all permissions.

    Do I have to wait?
    Or something wrong happened?

    it would be great if anyone who know about this help me.

    • WPBeginner Support

      It would depend on if you are seeing an error message on your site, for a starting point we would recommend reaching out to your hosting provider to see if they find any errors.

      Administrador

  15. Bobbi

    Does anyone have any idea why, every time wordpress automatically updates, I have to go back in and reset file permissions? This page is really useful for fixing this issue, but I just want it to stop!

    • WPBeginner Support

      You may want to reach out to your hosting provider to ensure there isn’t a setting that could be causing that from their end.

      Administrador

  16. Harvey

    Thank you! This article just saved my web page!

    • WPBeginner Support

      You’re welcome, glad our guide was helpful :)

      Administrador

  17. marni

    How do you handle the request for FTP credentials when you’re learning WordPress on a local host? I read this article but the sharing and permissions menu on a mac does not show a numeric value field.

    • WPBeginner Support

      It would depend on the specific issue you’re running into but rather than needing FTP for a local installation, you would want to navigate to where the files are on your computer.

      Administrador

  18. MikeMoy

    For files you state to give permissions 644 for owner,group,others. Why do you give file read permissions (4) to others. Is there some reason others require file read permissions, why are all files not set to 640 ?

    • WPBeginner Support

      Then users would run into an issue trying to view your content.

      Administrador

  19. Ali Jey

    Thanks for the tutorial. I could fix this problem for files already on the website, but everytime new files are uploaded they have the same problem again!

    • WPBeginner Support

      If this issue is constant, we would recommend reaching out to your hosting provider to take a look at possible causes.

      Administrador

  20. Trish

    having this issue on a locally hosted site that I’m using for test purposes only. So I don’t have FTP access to the files and changing their permissions from Windows Explorer is not working. Any other ideas?
    The main WP directory and the Themes directory are both unwritable according to the WP System Tools.

    • WPBeginner Support

      You would want to check with the localhost tool you are using for your site as which one you are using would determine the options you have available and the possible issues.

      Administrador

    • Krisjanis Nimanis

      Hello, did You manage to fix your error? And what localhost tool are you using?

  21. Md Rasel Rahman Ricky

    Thank you sir….
    This Tutorial is working….

    • WPBeginner Support

      Glad our guide was helpful :)

      Administrador

  22. Saqib Naqash

    Update php vision to latest

    • WPBeginner Support

      Thanks for sharing another recommendation people can try :)

      Administrador

  23. kyrien

    i accidentally changed the permission on my update file to xxx and now when i try to change it back to 755 it won’t save. Any help?

    • WPBeginner Support

      If you’re unable to update the file permissions, you would want to reach out to your hosting provider they should be able to assist :)

      Administrador

  24. dominique

    I’ve made your solution with the permissions 755 and 644, the website works a few seconds and than it breaks agin. And i have to do the permissions again. can you help me?

    • WPBeginner Support

      If the permissions are reverting then you would want to reach out to your hosting provider to ensure that there isn’t a setting on their end that would modify the permissions as well.

      Administrador

  25. anami

    Installation failed: Could not create directory.

    • WPBeginner Support

      If the method in this article does not remove that error, you would want to reach out to your hosting provider.

      Administrador

  26. Suzana

    Hi, I should change file permission:
    / 755 750 WARNING

    Can somebody tell me, where to find this “/” in C panel? To be honest, I don’t know, what this sign / means. Thank you, have a great day! Suzana

    • WPBeginner Support

      If you’re using the file manager on your host’s cpanel then your site’s files are normally under public_html as that is where most FTPs connect to your host.

      Administrador

  27. UDAY

    how to solve the error Could not create directory in wordpress uploading thems

  28. Dan

    Thanks for this article! I thought I had completely fudged my site. None of my uploaded media or even CSS styling (I have no idea why that was effected) was displaying properly.

    I had tweaked my permissions earlier but must have done it incorrectly. Your fix was the solution to my problem!

    Many thanks

  29. Erik

    Thank you for this insightful article – I will keep it as a ressource for cases of curiousity (and panic, of course :D).
    What I am struggling with are “wp GET”-lookups with result 404 when playing around with cacheing.
    My wordpress installation is in a subfolder named wp, not in the root folder.
    Which rights would I have to give this specific folder?

    Thanks in advance for any help.

  30. imran

    Hi there, Im having issues in links of FTP and Wordpress..first i make a basic html and upload thrugh FTP after sometime i convert that website in using wordpress..now the issue is that the links of those html files and folders which i uploaded in FTP is now not working.just new links are working.The Error is ” No Page Found”
    is there any tool, plugin or way to make alive those FTP Html links??please help me in this issue

  31. Osuji Macdonald

    my system can not read Wordpress properly. the files are not displaying very well. it just showing white icons of the files like a white sheet paper.

  32. Odhran

    Hi

    I have wordpress installed on a local server and I’m getting ‘no data could be retrieved from the servers’ when I try to access the slider revolution library.

    Is this because of the file permissions error described here? I’ve set all of the user permissions to ‘full control’ in my index.php file to no avail. I don’t seem to have the option to change to the numeric permissions you describe above. Really stuck on this one so any help would be appreciated.

    thanks & regards
    Odhran

  33. Andy

    I changed 755 to all folder and 644 to all file. But still cannot upload images to Media and cannot install new plugins.

    PS: I upload whole wp-content folder from another hosting to my new hosting and extract it.

    Please give me some advices.

    Thank you.

    • Cody Cortez

      This is because you can’t just copy item from a server to another without tweaking the Database. The database must know that the ones you just copied ‘exist’

    • Taran jeet

      Try to Change Max Upload Size and File Size. This will Fix Your Issue. As It Works For Me

  34. Nazrul Islam

    Useful but since I’m such a newbie and still learning WordPress, I am stuck. I can’t even seem to log in because of the 500 internal server error. Do you know what I should do?

  35. Ali osama

    I’ve a problem after i changed permissions to be like above, this error appears :
    “Application error
    An error occurred in the website and your page could not be displayed. If you are the website owner, check your logs for details”

  36. Ethan

    This works for all types of PHP applications sitting on a website server and not only WordPress. My host denied me access to all folders and files including login page and registration page.

    Little did i know that all my files and folders were still to 777 during local development. After changing folders and files recursively to 755 and 644 respectively it worked.

  37. LB

    Hi there, Im having issues in that I dont have sufficient permissions to change permissions through the FTP client… unable to create new folders. very frustrating, have spent ages looking for a solution. Running a WP multisite running on Amazon EC2). Thanks.

    • Suyog

      @LB , you have limited access to your FTP account. Please contact Amazon to get you full access. or if you have server access then change permission in filezilla server.

Deixe uma resposta

Obrigado por deixar um comentário. Lembre-se de que todos os comentários são moderados de acordo com nossos política de comentários, e seu endereço de e-mail NÃO será publicado. NÃO use palavras-chave no campo do nome. Vamos ter uma conversa pessoal e significativa.