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

Så här fixar du error i fil- och folderbehörigheter i WordPress

Vill du fixa error i fil- och folderbehörigheter i WordPress?

Felaktiga behörigheter för filer och foldrar kan orsaka error på din WordPress site under upload. Dessa error kan hindra WordPress från att uppladare images, störa skript och minska säkerheten på din website.

I den här artikeln visar vi dig hur du enkelt fixar error i fil- och folderbehörigheter i WordPress.

Fix file and folder permissions in WordPress

Hur fungerar behörigheter för filer och foldrar i WordPress?

Fil- och folderbehörigheter i WordPress kontrollerar vem som kan läsa, run eller ändra webbplatsens filer. Ditt WordPress-webbhotell använder speciell programvara som Apache för att hantera och visa dessa filer på webbläsare.

Dessa behörigheter är avgörande för att WordPress ska kunna hantera filer, skapa foldrar och utföra uppgifter på servern.

Om behörigheterna är felaktigt inställda kan det hindra WordPress från att göra saker som att skapa foldrar, uppladare images eller runna skript. Felaktiga behörigheter hotar också säkerheten på din WordPress site.

När behörigheterna är felaktiga brukar WordPress vanligtvis alertera dig om issues som att du gillar att inte kunna editera filer eller skapa foldrar. Ibland kanske du dock inte ser specifika meddelanden om error.

Vilka är de korrekta behörigheterna för filer och foldrar i WordPress?

Med korrekta Settings för fil- och folderbehörighet allow WordPress att skapa mappar och filer. Följande Settings rekommenderas för de flesta användare:

  • 755 för alla foldrar och underfoldrar. Detta allow the website owner to read, write, and execute folders.
  • 644 för alla filer. This allows the website owner to read and write files while others can only read them.

Med detta sagt, låt oss ta en titt på hur man enkelt fixar fil- och folderbehörigheter i WordPress. Vi har två metoder, och du kan använda snabblänkarna under för att hoppa till din föredragna metod:

Metod 1: Fixa WordPress behörigheter för filer och mappar med ett plugin

För att fixa error i fil- och folderbehörigheter i WordPress måste du vanligtvis använda en FTP-klient. Om du är säker på att du kan lösa detta error manuellt, kan du hoppa till den andra metoden.

Om ej, så kan du använda denna plugin-metod med All-in-One Security plugin. Detta plugin har en utvald funktion för att ställa in de rekommenderade behörigheterna för filer och foldrar med några clicks.

Denna tutorial kommer att använda den fria versionen av plugin, men känn dig fri att använda den betalda versionen för mer avancerade funktioner. Du kan läsa vår review på All-in-One Security för mer information.

Först installerar du pluginet All-in-One Security i WordPress. Du kan kontrollera vår Step-by-Step guide om hur du installerar ett WordPress plugin för mer information.

När du är klar går du till WP Security ” File Security. Navigera sedan till tabben ”File Permissions”.

All in One Security's File Security feature

Här kommer plugin att skanna de kritiska WordPress core mappar och filer och markera alla inställningar för behörighet som är osäkra.

Om pluginet hittar en folder eller fil med behörighet error, kommer kolumnen ”Recommended action” att ha en knapp som heter ”Set recommended permissions”.

För att fixa det klickar du bara på det så ändrar pluginet behörigheterna för filen eller mappen.

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

När du har gjort det ska Column ”Recommended action” nu ändras till ”No action required”.

Metod 2: Fixa WordPress behörigheter för filer och mappar manuellt

Först måste du ansluta till din WordPress site med hjälp av en FTP-klient som FileZilla eller appen File Manager i din cPanel. När du är ansluten går du bara till rotmappen på din WordPress website.

Efter det måste du välja alla foldrar i root directory och sedan högerklicka för att select ”File permissions”.

File permissions in FTP

Detta gör att dialogboxen för filbehörigheter dyker upp.

Nu måste du enter ’755’ i det numeriska värdefältet. Efter det måste du klicka på checkboxen ”Recursion into subdirectories” och sedan välja alternativet ”Tillämpa to directories only”.

Fixing folder permissions in WordPress

Klicka på knappen ”OK” för att fortsätta. Din FTP-klient kommer att börja ange behörigheter för foldrar och underfoldrar. You will have to wait for it to finish.

Därefter måste du välja alla filer och mappar i rotmappen på din site WordPress och sedan högerklicka för att select ”File permissions”.

Setting permissions for all files

Dialogboxen för filbehörigheter visas.

Den här gången måste du enter ’644’ i ’Numeric value’ boxen. Efter det klickar du bara på checkboxen ’Recursion into subdirectories’ och väljer sedan alternativet ’Tillämpa to files only’.

Setting permissions for files in WordPress

Klicka på ”OK” för att fortsätta.

Din FTP-klient kommer nu att börja ställa in filbehörigheter för alla filer på din WordPress site.

Om den här metoden inte fungerar rekommenderar vi att du kontaktar din hosting provider. Det kan finnas ett error hos dem, och de kanske kan hjälpa you. Läs vår guide om hur du på rätt sätt ber om support för WordPress för fler tips.

Om du vill lära dig mer om WordPress-filer kan du kontrollera vår guide för nybörjare om WordPress-filer och -directories.

Learn More sätt att lösa error i WordPress

Upplever du andra typer av error på din website i WordPress? Kolla in dessa guider för att fixa problemet och hålla din site igång:

Vi hoppas att den här artikeln hjälpte dig att fixa error i fil- och folderbehörigheter i WordPress. Du kanske också vill se vår guide om hur du fixar vanliga WordPress error och kontrollera våra toppval för de bästa WordPress-tilläggen för att utveckla din site.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Avslöjande: Vårt innehåll stöds av våra läsare. Det innebär att om du klickar på några av våra länkar, kan vi tjäna en provision. Se hur WPBeginner finansieras, varför det är viktigt, och hur du kan stödja oss. Här är vår editoriala process.

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.

Den ultimata WordPress-verktygslådan

Få GRATIS tillgång till vår verktygslåda - en samling WordPress-relaterade produkter och resurser som varje professionell användare bör ha!

Reader Interactions

71 kommentarerLämna ett svar

  1. Syed Balkhi

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. 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.

      Administratör

    • Jiří Vaněk

      Chmod is mainly used as a command directly on a Linux server. You connect there using SSH and use the chmod command to change the permissions on the file. If you have shared hosting, you don’t always have access to data using SSH. A better choice for shared web hosting is an FTP client, in which you can also set file rights, but more easily and securely.

  3. 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.

      Administratör

  4. 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.

      Administratör

  5. 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!

      Administratör

  6. Awais

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

    • WPBeginner Support

      Glad our guide was helpful :)

      Administratör

  7. Shahid

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

    • WPBeginner Support

      Glad our guide was helpful :)

      Administratör

  8. 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 :)

      Administratör

      • Tracy

        Thank you very much. This tutorial was extremely helpful.

        • WPBeginner Support

          Glad our guide was helpful!

  9. 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 :)

      Administratör

  10. John

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

    • WPBeginner Support

      Glad our guide was able to help :)

      Administratör

  11. 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

      Administratör

  12. 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.

      Administratör

  13. 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.

      Administratör

  14. Andy

    Thanks so much! Worked great.

    • WPBeginner Support

      Glad our guide could help you :)

      Administratör

  15. 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.

      Administratör

  16. 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.

      Administratör

  17. Harvey

    Thank you! This article just saved my web page!

    • WPBeginner Support

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

      Administratör

  18. 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.

      Administratör

  19. 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.

      Administratör

  20. 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.

      Administratör

  21. 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.

      Administratör

    • Krisjanis Nimanis

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

  22. Md Rasel Rahman Ricky

    Thank you sir….
    This Tutorial is working….

    • WPBeginner Support

      Glad our guide was helpful :)

      Administratör

  23. Saqib Naqash

    Update php vision to latest

    • WPBeginner Support

      Thanks for sharing another recommendation people can try :)

      Administratör

  24. 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 :)

      Administratör

  25. 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.

      Administratör

  26. 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.

      Administratör

  27. 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.

      Administratör

  28. UDAY

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

  29. 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

  30. 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.

  31. 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

  32. 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.

  33. 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

  34. 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

  35. 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?

  36. 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”

  37. 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.

  38. 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.

Lämna ett svar

Tack för att du väljer att lämna en kommentar. Tänk på att alla kommentarer modereras enligt våra policy för kommentarer, och din e-postadress kommer INTE att publiceras. Vänligen använd INTE nyckelord i namnfältet. Låt oss ha en personlig och meningsfull konversation.