Volete risolvere l’errore dei permessi di file e cartelle in WordPress?
I permessi di file e cartelle non corretti possono causare errori sul vostro sito WordPress durante il caricamento. Questi errori possono impedire a WordPress di caricare le immagini, interferire con gli script e ridurre la sicurezza del sito.
In questo articolo vi mostreremo come risolvere facilmente l’errore dei permessi di file e cartelle in WordPress.
Come funzionano i permessi per i file e le cartelle in WordPress?
I permessi dei file e delle cartelle in WordPress controllano chi può leggere, eseguire o modificare i file del vostro sito. L’azienda di hosting web WordPress utilizza un software speciale come Apache per gestire e mostrare questi file sui browser.
Queste autorizzazioni sono fondamentali per consentire a WordPress di gestire i file, creare cartelle ed eseguire attività sul server.
Se i permessi sono impostati in modo errato, possono impedire a WordPress di fare cose come creare cartelle, caricare immagini o eseguire script. I permessi errati minacciano anche la sicurezza del vostro sito WordPress.
Quando i permessi sono errati, WordPress di solito segnala problemi come l’impossibilità di modificare i file o creare cartelle. Tuttavia, a volte, non è possibile visualizzare messaggi di errore specifici.
Quali sono i permessi corretti per i file e le cartelle in WordPress?
Le corrette impostazioni dei permessi di file e cartelle consentono a WordPress di creare cartelle e file. Le seguenti impostazioni sono consigliate per la maggior parte degli utenti:
- 755 per tutte le cartelle e sottocartelle. Ciò consente al proprietario del sito web di leggere, scrivere ed eseguire le cartelle.
- 644 per tutti i file. Ciò consente al proprietario del sito web di leggere e scrivere i file, mentre gli altri possono solo leggerli.
Detto questo, vediamo come correggere facilmente i permessi di file e cartelle in WordPress. Abbiamo due metodi e potete usare i link rapidi qui sotto per passare al metodo che preferite:
Metodo 1: correggere le autorizzazioni di WordPress per file e cartelle con un plugin
Per correggere l’errore relativo alle autorizzazioni dei file e delle cartelle di WordPress è solitamente necessario utilizzare un client FTP. Se siete sicuri di poter correggere questo errore manualmente, potete passare al secondo metodo.
In caso contrario, è possibile utilizzare questo metodo di plugin con il plugin Tutto-in-uno Security. Questo plugin ha una caratteristica che consente di impostare le autorizzazioni raccomandate per file e cartelle facendo pochi clic.
In questa guida verrà utilizzata la versione gratuita del plugin, ma per le caratteristiche più avanzate è possibile utilizzare la versione a pagamento. Per maggiori informazioni, potete leggere la nostra recensione su Tutto-in-uno Security.
Per prima cosa, installate il plugin Tutto-in-uno Security in WordPress. Per maggiori informazioni, potete selezionare la nostra guida passo-passo su come installare un plugin di WordPress.
Una volta fatto, andare su WP Security “ File Security. Quindi, navigare nella scheda “Autorizzazioni file”.
In questo caso, il plugin esegue una scansione delle cartelle e dei file critici del nucleo di WordPress ed evidenzia eventuali impostazioni di autorizzazione non sicure.
Se il plugin trova una cartella o un file con errori di autorizzazione, la colonna “Azione consigliata” contiene un pulsante chiamato “Imposta autorizzazioni consigliate”.
Per correggerlo, basta fare clic su di esso e il plugin modificherà le autorizzazioni dei file o delle cartelle.
Una volta fatto, la colonna “Azione consigliata” dovrebbe essere cambiata in “Nessuna azione necessaria”.
Metodo 2: correggere manualmente le autorizzazioni di WordPress per file e cartelle
Per prima cosa, dovrete collegarvi al vostro sito WordPress utilizzando un client FTP come FileZilla o l’applicazione File Manager del vostro pannello di controllo. Una volta collegati, basta andare alla cartella principale del sito WordPress.
Successivamente, è necessario selezionare tutte le cartelle della directory principale e poi fare clic con il pulsante destro del mouse per selezionare “Autorizzazioni file”.
In questo modo si aprirà la finestra di dialogo dei permessi dei file.
A questo punto, è necessario inserire ‘755’ nel campo del valore numerico. Dopodiché, è necessario fare clic sulla casella di controllo “Ricorri nelle sottodirectory” e selezionare l’opzione “Applica solo alle directory”.
Fare clic sul pulsante “OK” per continuare. Il client FTP inizierà a impostare le autorizzazioni per le cartelle e le sottocartelle. È necessario attendere che finisca.
Successivamente, è necessario selezionare tutti i file e le cartelle nella cartella principale del sito WordPress e poi fare clic con il pulsante destro del mouse per selezionare “Autorizzazioni file”.
Viene visualizzata la finestra di dialogo delle autorizzazioni dei file.
Questa volta è necessario inserire ‘644’ nella casella ‘Valore numerico’. Dopodiché, è sufficiente fare clic sulla casella di controllo “Ricorri nelle sottodirectory” e selezionare l’opzione “Applica solo ai file”.
Fare clic su “OK” per continuare.
Il vostro client FTP inizierà a impostare i permessi per tutti i file del vostro sito WordPress.
Se questo metodo non funziona, vi consigliamo di contattare il vostro provider di hosting. Potrebbe esserci un errore da parte loro e potrebbero essere in grado di aiutarvi. Leggete la nostra guida su come richiedere correttamente l’assistenza di WordPress per ulteriori suggerimenti.
Per saperne di più sui file di WordPress, consultate la nostra guida per principianti sui file e le directory di WordPress.
Approfondisci i modi per risolvere gli errori di WordPress
Avete riscontrato altri tipi di errori sul vostro sito web WordPress? Selezionate queste guide per correggere il problema e far funzionare il vostro sito senza problemi:
- Come correggere l’errore 503 Service Unavailable in WordPress
- Come correggere l’errore “Manca una cartella temporanea” in WordPress
- Come correggere l’errore “Cartella di destinazione già esistente” in WordPress
- Come correggere gli errori del file Pluggable.php in WordPress
- Come correggere l’errore “NON SI TRADUCE Questo tipo di file non è consentito per motivi di sicurezza” in WordPress
- Come correggere l’errore “Googlebot non può accedere ai file CSS e JS” in WordPress
- Come correggere l’errore “Uploader: Failed to Write File to Disk” Errore in WordPress
- Come correggere l’errore “WordPress Database Error Disk Full”.
- Come correggere l’errore di uploader di immagini HTTP in WordPress (facile)
Speriamo che questo articolo vi abbia aiutato a risolvere l’errore dei permessi di file e cartelle in WordPress. Potreste anche consultare la nostra guida su come risolvere gli errori comuni di WordPress e dare un’occhiata alla nostra classifica dei migliori plugin di WordPress per far crescere il vostro sito.
Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.
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.
Admin
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.
Admin
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.
Admin
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!
Admin
Awais
Hi,
Thank you so much for this guide, it helped me to fix my issue. awesome!!
WPBeginner Support
Glad our guide was helpful
Admin
Shahid
Thank you …. I set the folder permission to 755 and error was gone
WPBeginner Support
Glad our guide was helpful
Admin
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
Admin
Tracy
Thank you very much. This tutorial was extremely helpful.
WPBeginner Support
Glad our guide was helpful!
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
Admin
John
Thanks very much. I messed up permissions and your instructions fixed up everything.
WPBeginner Support
Glad our guide was able to help
Admin
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
Admin
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.
Admin
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.
Admin
Andy
Thanks so much! Worked great.
WPBeginner Support
Glad our guide could help you
Admin
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.
Admin
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.
Admin
Harvey
Thank you! This article just saved my web page!
WPBeginner Support
You’re welcome, glad our guide was helpful
Admin
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.
Admin
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.
Admin
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.
Admin
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.
Admin
Krisjanis Nimanis
Hello, did You manage to fix your error? And what localhost tool are you using?
Md Rasel Rahman Ricky
Thank you sir….
This Tutorial is working….
WPBeginner Support
Glad our guide was helpful
Admin
Saqib Naqash
Update php vision to latest
WPBeginner Support
Thanks for sharing another recommendation people can try
Admin
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
Admin
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.
Admin
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.
Admin
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.
Admin
UDAY
how to solve the error Could not create directory in wordpress uploading thems
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
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.
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
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.
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
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
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?
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”
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.
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.