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

Come risolvere l’errore 403 Forbidden in WordPress

Nota editoriale: guadagniamo una commissione dai link dei partner su WPBeginner. Le commissioni non influenzano le opinioni o le valutazioni dei nostri redattori. Per saperne di più su Processo editoriale.

Avete a che fare con l’errore 403 Forbidden sul vostro sito WordPress?

L’errore 403 Forbidden è uno degli errori più fastidiosi che un proprietario di un sito web WordPress possa incontrare. Può impedirvi di accedere all’area di amministrazione di WordPress e/o a pagine specifiche del vostro sito web.

In questo articolo vi mostreremo come risolvere facilmente l’errore 403 Forbidden in WordPress.

Fixing 403 Forbidden error in WordPress

Che cos’è l’errore 403 Forbidden in WordPress?

Il codice di errore 403 Forbidden viene visualizzato quando i permessi del server non consentono l’accesso a una pagina specifica del vostro sito WordPress.

Questo errore è solitamente accompagnato dal testo:

403 Forbidden – Non si ha il permesso di accedere a ‘/’ su questo server.

Inoltre, è stato riscontrato un errore 403 Forbidden mentre si cercava di usare un ErrorDocument per gestire la richiesta.

Ecco un esempio di come si presenta:

403 Forbidden status code shown on a WordPress site

Ci sono diversi scenari in cui si può vedere questo errore. Ad esempio:

È possibile che venga visualizzato il messaggio “Accesso negato” invece dello stato completo 403 Forbidden. In alternativa, il messaggio potrebbe dire: “L’accesso a yourdomain.com è stato negato. Non sei autorizzato a visualizzare questa pagina”.

Per ulteriori spiegazioni sui codici di errore di WordPress, potete consultare il nostro elenco degli errori più comuni di WordPress e come risolverli.

Ora che conoscete i diversi tipi di errore 403, parliamo delle loro cause.

Cosa causa l’errore 403 Forbidden in WordPress?

Il codice di errore 403 Forbidden compare quando il server non consente l’accesso a una pagina specifica. Le cause possono essere diverse.

Una causa comune dell’errore 403 Forbidden in WordPress è rappresentata da plugin di sicurezza mal configurati. Molti plugin di sicurezza di WordPress possono bloccare un indirizzo IP (o un’intera serie di indirizzi IP) se li ritengono dannosi.

Un’altra possibile causa potrebbe essere un file .htaccess corrotto o permessi di file errati sul server.

La società di hosting WordPress può talvolta apportare modifiche accidentali alle impostazioni del server. Ciò può causare un errore 403 Forbidden sul vostro sito.

Detto questo, vediamo come risolvere l’errore 403 forbidden in WordPress.

Nota: prima di fare qualsiasi cosa, vi consigliamo di creare un backup completo del vostro sito WordPress. Potete consultare la nostra guida su come eseguire il backup del vostro sito WordPress. Se utilizzate un plugin di backup automatico di WordPress, assicuratevi di avere accesso all’ultimo backup prima di procedere.

È possibile utilizzare questi collegamenti rapidi se si desidera passare a un metodo specifico:

Video tutorial

Subscribe to WPBeginner

Se preferite le istruzioni scritte, continuate a leggere.

Metodo 1: risolvere l’errore 403 Forbidden causato da un plugin di WordPress

La prima cosa da fare è verificare se uno dei plugin di WordPress sta causando l’errore 403 Forbidden. A tal fine, è necessario disattivare temporaneamente tutti i plugin di WordPress. Questo include tutti i plugin di sicurezza installati sul sito.

Se questo risolve il problema, significa che uno dei plugin del sito web ha causato l’errore.

È possibile capire quale plugin ha causato l’errore attivando tutti i plugin uno alla volta fino a riprodurre l’errore 403 Forbidden. A questo punto, è necessario eliminare il plugin problematico e cercare un’alternativa o contattare gli sviluppatori per ottenere assistenza.

Se questo metodo non funziona, continuate a leggere.

Metodo 2: risolvere l’errore 403 Forbidden causato da un file .htaccess corrotto

Spesso l’errore 403 Forbidden è causato da un file .htaccess corrotto nel vostro sito WordPress. La buona notizia è che correggere questo file è abbastanza facile.

Per prima cosa, è necessario collegarsi al proprio sito web utilizzando un client FTP come FileZilla o l’applicazione File Manager di cPanel.

Quindi, trovate il file .htaccess nella cartella principale del vostro sito WordPress. Consultate questa guida se non riuscite a trovare il file .htaccess nella cartella di WordPress.

È necessario scaricare il file .htaccess sul computer, in modo da avere un nuovo backup. Dopodiché, cancellate semplicemente il file dal vostro server. Non preoccupatevi, WordPress continuerà a funzionare.

Delete .htaccess file from your WordPress site

Ora provate ad accedere al vostro sito web. Se l’errore 403 forbidden viene risolto, significa che il file .htaccess era corrotto.

È possibile generare un nuovo file .htaccess accedendo all’area di amministrazione di WordPress e andando alla pagina Impostazioni ” Permalinks”.

Regenerating .htaccess file in WordPress

Basta fare clic sul pulsante “Salva modifiche” in fondo alla pagina e WordPress genererà un nuovo file .htaccess.

Metodo 3: risolvere l’errore 403 Forbidden causato dai permessi dei file in WordPress

Se le altre soluzioni non hanno risolto l’errore 403 forbidden sul vostro sito, la causa più probabile sono i permessi dei file non corretti.

Tutti i file memorizzati sul vostro sito web hanno dei permessi per i file. Questi permessi controllano chi può accedere ai file e alle cartelle del vostro sito WordPress.

I permessi dei file non corretti possono causare l’errore 403 Forbidden. In questo modo il server web pensa che l’utente non abbia il permesso di accedere a quei file.

Potete chiedere al vostro provider di hosting WordPress di controllare che i permessi dei file sul vostro sito siano corretti. Alcuni hosting sono molto disponibili, quindi non se la prenderanno e probabilmente risolveranno il problema per voi.

Modificare da soli i permessi dei file può avere gravi conseguenze. Se non vi sentite sicuri di farlo da soli, è meglio chiedere aiuto a un collega proprietario di un sito WordPress o affidarsi a un professionista.

Tuttavia, se volete farlo da soli, ecco come controllare i permessi dei file.

Collegatevi al vostro sito WordPress utilizzando un client FTP. Passate alla cartella principale contenente tutti i file di WordPress.

Checking file permissions

Fare clic per selezionare una cartella, fare clic con il pulsante destro del mouse e selezionare “Autorizzazioni file” dal menu.

Il vostro client FTP vi mostrerà una finestra di dialogo sui permessi dei file come questa:

Changing file permissions using FTP

Tutte le cartelle del vostro sito WordPress devono avere un permesso file di 744 o 755.

Nel frattempo, tutti i file del vostro sito WordPress devono avere un permesso di 644 o 640.

È possibile impostare il permesso dei file per la cartella principale su 744 o 755. È inoltre necessario selezionare la casella accanto a “Ricorri nelle sottodirectory” e poi selezionare l’opzione “Applica solo alle directory”.

È sufficiente fare clic sul pulsante “OK”. Il client FTP inizierà a impostare i permessi per tutte le sottodirectory della cartella.

Una volta terminato, è necessario ripetere il processo per tutti i file. Questa volta, si utilizzerà un’autorizzazione dei file di 644 o 640 e non si dimenticherà di selezionare le opzioni “Ricorri nelle sottodirectory” e Applica solo ai file”.

Facendo clic sul pulsante “OK”, il client FTP inizierà a impostare le autorizzazioni per tutti i file selezionati.

Provate ora ad accedere al vostro sito web e verificate se l’errore 403 forbidden è scomparso. Ecco fatto!

Speriamo che questo articolo vi abbia aiutato a risolvere l’errore 403 forbidden in WordPress. Potreste anche voler consultare i nostri consigli degli esperti e gli hack per proteggere l’area di amministrazione di WordPress e il nostro articolo sul perché utilizziamo Sucuri per migliorare la sicurezza di tutti i nostri siti WordPress.

Se questo articolo vi è piaciuto, iscrivetevi al nostro canale YouTube per le esercitazioni video su WordPress. Potete trovarci anche su Twitter e Facebook.

Divulgazione: I nostri contenuti sono sostenuti dai lettori. Ciò significa che se cliccate su alcuni dei nostri link, potremmo guadagnare una commissione. Vedi come WPBeginner è finanziato , perché è importante e come puoi sostenerci. Ecco il nostro processo editoriale .

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.

Il kit di strumenti WordPress definitivo

Ottenete l'accesso gratuito al nostro kit di strumenti - una raccolta di prodotti e risorse relative a WordPress che ogni professionista dovrebbe avere!

Reader Interactions

162 commentiLascia una risposta

  1. Syed Balkhi says

    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. mohadese esmaeeli says

    Hello, good day. I appreciate your efforts in creating this content. The presence of a 403 error is often due to permission issues. I have encountered it multiple times, and most of the time, fixing permissions resolves the error. I’ve successfully resolved my site’s 403 error with the help of this guide before.

  3. Kevin says

    For my site it ended up being ModSecurity. I eliminated any robots.txt and .htaccess issues. I found the issue when looking at the apache log and then whitelisted the rule. All was fine after that . Took about 4 days to figure it all out.

  4. iri says

    Thanks for this information! It has been very helpful. I had this error in several pages with broken images (I think this happened after buying a larger hosting plan) and it seems the problem was a corrupted .htaccess file, but thanks to this info I solved it in one minute!

  5. Ayouba Seybou says

    Hello,
    i am getting the same error but in my case, i have access to my dashboard. the the problems begin when i click on some admin menu like page, update, setting.

    • WPBeginner Support says

      Our recommendations would be the same even if you still have access to your wp-admin area.

      Admin

  6. Wendy Clash says

    Thank you so much. I had to restore my website and I got this error. The entire folder for my wordpress site dit not have the right permissions. I changed it and it worked. Thanks so much.

    • WPBeginner Support says

      Thank you for sharing that, if it gets to the point where disabling mod security is what you want to try, we would recommend most beginners reach out to their hosting provider instead to see if their host sees an error or something on their end that could be fixed.

      Admin

  7. Jason Gomes says

    I am getting 403 Error on Updates page as well as Plugins Add new page any suggestions what can I Do?

    • WPBeginner Support says

      Reach out to your hosting provider for them to take a look and they should be able to help fix that issue.

      Admin

  8. Suraj says

    I tried all the mentioned points. My site is still showing the same message as “”Your connection is not private” and “403 Forbidden”. Please help…

    • WPBeginner Support says

      If none of our recommendations are able to assist you, we would recommend reaching out to your hosting provider to ensure there are no issues on their end.

      Admin

    • WPBeginner Support says

      There can be or sometimes the host may prevent the file permissions from being changed. If our guide did not help we would recommend reaching out to your hosting provider and they should be able to assist.

      Admin

  9. Aditya PF says

    Hi, how to solve the 403 forbidden but only happens when try to publish or update post/pages? I have no problems when accessing website or upload media

    • WPBeginner Support says

      Reach out to your hosting provider for them to take a look and they should be able to assist and fix that issue.

      Admin

    • WPBeginner Support says

      If none of these recommendations helped, we would recommend reaching out to your hosting provider and they can normally assist

      Admin

  10. Alan Wright says

    Followed up all tips, thank you. The htaccess one was closest: after removing the image Hotlinks rule within, my site is finally back to normal!

  11. Alabi says

    I never knw .htaccess get corrupt. Tip number 2 fixed it quickly but I was unable to generate the .htaccess. So I downloaded, delete and re-upload the .htaccess and it worked super fine. Thank you, WPBeg

  12. Humayan Kabir says

    Hi,

    Suddenly my website is showing a message “This site can’t be reached” .Can anybody help me ? i am unable to fix it for last 7days.

    Thanks,

    • WPBeginner Support says

      Have you reached out to your hosting provider? They can normally let you know any errors they can find on your site.

      Admin

  13. Essau says

    I’m glad I read the post and tried everything mentioned here but it did not work. However, the user comments were resourceful. I tried step by step all the suggestions people have mentioned and I found that MOD SECURITY, just as others have mentioned, is the main culprit.

    Since I’ running a VPS, I disabled it from my control panel and did the adjustments I wanted on my site and it worked like a charm!.

  14. N. iru says

    After I installed wordpress. My webpage is still on 403 error and when I go to /wp-admin a 404 error appears. Basically wp-admin is missing. How should I fix this?

  15. Adam says

    Hi,

    My images don’t appear at all when I view my site on different web browsers.

    What could be causing this?

    cheers

  16. Nukri Tusishvili says

    I have tried all the things, checked stackoverflow, google, than tried these paths and none of them work. The last thing i did i reinstalled wordpress from dashboard and it worked. 403 forbidden disappeared…

    Thank you anyway for this article. hope my exp will help others also :)

    • WPBeginner Support says

      Should the problem continue with yoast, if you reach out to the plugin’s support they may be able to update and fix the problem :)

      Admin

  17. David Kempton says

    File uploads with illegal characters (e.g. apostrophe in my recent cases) cause a 403 error. I have seen this with file submissions in Gravity and WPForms.

  18. Jan says

    I have started a new website for an individual through WP. When old website is pulled up, it gives a “Forbidden- access denied on this server”. I have tried many things through WP to fix the problem, but since it was that way before, would it be something from the last webhost? I have changed the nameservers on the domain site to the new host site I’m using. The new host has it as primary domain, but says domain is locked. Would unlocking the domain name make a difference? Any help would be MUCH APPRECIATED!!

    • WPBeginner Support says

      If the domain is locked then your old hosting provider normally may not be accepting the nameserver edits. If you reach out to where the domain is currently hosted they should be able to ensure the domain is pointing correctly.

      Admin

  19. Stephanie says

    “Failed to load resource: the server responded with a status of 403 (Forbidden) async-upload.php:1” is the console error log I am seeing when I try to upload an image to media in the dashboard. It says “http error” when I try upload any files. And they’re only a few kb, also the upload size has been increased already.

    Any suggestions?!

    • WPBeginner Support says

      Reach out to your hosting provider and let them know about the issue and they should be able to assist

      Admin

  20. liam says

    Hiya Folks, I worked through everything and nothing seemed to fix my problem then I had a spark of genius. If you use Cpanel then check under the Security option for Hotlink protect. You may have it turned on. Just add your full site website web address to it and click submit it should work. It did for me

  21. Luthfunnahar Hussain says

    why i am getting this problem –
    Failed to load resource: the server responded with a status of 403 (Forbidden)
    wp-content/themes/health/assets/slabText/css/slabtext.css?ver=5.0.3

    • WPBeginner Support says

      You would want to take a look at step 3 in the article for an error like that with your theme

      Admin

  22. Wellington Lübke says

    Works for me after i disabled ModSecurity on Cpanel. If you don’t have access to this option, contact your host provider and say that you want to disable this option.
    Hope that works for y’all!

  23. twinkle says

    Hi, Please help.. I got this error when i tried to log in my wp-admin ..

    HTTP Error 403 – Forbidden
    The Web server is configured to not list the contents of this directory or you do not have enough permissions to access the resource

    Error. Page cannot be displayed. Please contact your service provider for more details. (14)

    Thanks in advance

  24. asim says

    When i was putting my second addon doamin i select blog in directory (optional). I think it should be empty now i can’t see my website when i enter sitename .com its says error. i can access my wp admin as sitename .com/blog/wp-admin. i want to remove blog from it. My first website on this hosting is working fine with wordpress, Godaddy. I don’t know what to do please some one help me???

  25. ItsMisterDavid says

    Thanks guys.
    You saved me a whole lot.
    I just discovered my Public Permissions were not readable and Executable.

Lascia una risposta

Grazie per aver scelto di lasciare un commento. Tenga presente che tutti i commenti sono moderati in base alle nostre politica dei commenti e il suo indirizzo e-mail NON sarà pubblicato. Si prega di NON utilizzare parole chiave nel campo del nome. Avremo una conversazione personale e significativa.