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

Comment Corrigé l’erreur 403 Forbidden dans WordPress

Note éditoriale : Nous percevons une commission sur les liens des partenaires sur WPBeginner. Les commissions n'affectent pas les opinions ou les évaluations de nos rédacteurs. En savoir plus sur Processus éditorial.

Êtes-vous confronté à l’erreur 403 Forbidden sur votre site WordPress ?

L’erreur 403 Forbidden est l’une des erreurs les plus ennuyeuses qu’un propriétaire de site WordPress puisse rencontrer. Elle peut vous empêcher d’accéder à la zone d’administration de WordPress et/ou à des pages spécifiques de votre site.

Dans cet article, nous allons vous afficher comment corriger facilement l’erreur 403 Forbidden sur WordPress.

Fixing 403 Forbidden error in WordPress

Qu’est-ce que l’erreur 403 Forbidden dans WordPress ?

Le code d’erreur 403 Forbidden s’affiche lorsque les droits de votre serveur ne permettent pas d’accéder à une page spécifique de votre site WordPress.

Cette erreur est généralement accompagnée du texte :

403 Forbidden – Vous n’avez pas le droit d’accéder à ‘/’ sur ce serveur.

De plus, une erreur 403 Forbidden a été rencontrée en essayant d’utiliser un ErrorDocument pour traiter la demande.

Voici un exemple de ce que cela donne :

403 Forbidden status code shown on a WordPress site

Cette erreur peut se produire dans différents cas de figure. Par exemple :

Vous pouvez également voir « Accès refusé » au lieu de l’état 403 Forbidden. Le message peut également indiquer : « L’accès à votredomaine.com a été refusé. Vous n’avez pas l’autorisation de voir cette page ».

Pour plus d’explications sur les codes d’erreur WordPress, vous pouvez consulter notre liste des erreurs WordPress les plus courantes et comment les corriger.

Maintenant que vous connaissez les différents types d’erreurs 403, parlons de leurs causes.

Quelle est la cause de l’erreur 403 Forbidden dans WordPress ?

Le code d’erreur 403 Forbidden apparaît lorsque votre serveur n’autorise pas l’accès à une page spécifique. Plusieurs causes peuvent être à l’origine de cette situation.

Une cause fréquente de l’erreur 403 Forbidden dans WordPress est une mauvaise configuration des extensions de sécurité. De nombreux plugins de sécurité WordPress peuvent bloquer une adresse IP (ou toute une plage d’adresses IP) s’ils estiment qu’elles sont malveillantes.

Une autre cause possible est un fichier .htaccess corrompu ou des droits d’accès incorrects sur votre serveur.

Votre entreprise d’hébergement WordPress peut parfois apporter des modifications accidentelles aux réglages de son serveur. Cela peut entraîner une erreur 403 Forbidden sur votre site.

Ceci étant dit, voyons comment corriger l’erreur 403 forbidden dans WordPress.

Note : Avant de faire quoi que ce soit, nous vous recommandons de créer une sauvegarde WordPress complète de votre site. Vous pouvez consulter notre guide sur la façon de sauvegarder votre site WordPress. Si vous utilisez une extension WordPress de sauvegarde automatique, alors assurez-vous que vous avez accès à la dernière sauvegarde avant d’aller de l’avant.

Vous pouvez utiliser ces liens rapides si vous souhaitez passer à une méthode spécifique :

Tutoriel vidéo

Subscribe to WPBeginner

Si vous préférez les instructions écrites, continuez à lire.

Méthode 1 : Corriger l’erreur 403 Forbidden causée par une extension WordPress

La première chose à faire est de vérifier si l’une de vos extensions WordPress est à l’origine de l’erreur 403 Forbidden. Pour ce faire, vous devez désactiver temporairement toutes les extensions WordPress. Cela inclut toutes les extensions de sécurité que vous avez installées sur votre site.

Si cela résout votre problème, cela signifie que l’une des extensions de votre site est à l’origine de cette erreur.

Vous pouvez déterminer quelle extension est à l’origine de l’erreur en activant toutes vos extensions une par une jusqu’à ce que vous reproduisiez l’erreur 403 Forbidden. Ensuite, vous devrez supprimer l’extension qui pose problème et chercher une alternative ou contacter les développeurs pour obtenir du support.

Si cette méthode ne fonctionne pas, continuez à lire.

Méthode 2 : Corrigé l’erreur 403 Forbidden causée par un fichier .htaccess corrompu

Souvent, l’erreur 403 Forbidden est causée par un fichier .htaccess corrompu dans votre site WordPress. La bonne nouvelle, c’est qu’il est assez facile de corriger ce fichier.

Tout d’abord, vous devez vous connecter à votre site à l’aide d’un client FTP tel que FileZilla ou l’application Gestionnaire de fichiers de cPanel.

Ensuite, trouvez le fichier .htaccess dans le dossier racine de votre site WordPress. Consultez ce guide si vous ne trouvez pas le fichier .htaccess dans votre dossier WordPress.

Vous devrez télécharger le fichier .htaccess sur votre ordinateur afin de disposer d’une nouvelle sauvegarde. Ensuite, il vous suffira de supprimer le fichier de votre serveur. Ne vous inquiétez pas, votre WordPress pourra toujours fonctionner.

Delete .htaccess file from your WordPress site

Essayez maintenant d’accéder à votre site. Si l’erreur 403 forbidden est résolue, cela signifie que votre fichier .htaccess était corrompu.

Vous pouvez générer un nouveau fichier .htaccess en vous connectant à votre espace d’administration WordPress et en allant sur la page Réglages  » Permaliens.

Regenerating .htaccess file in WordPress

Il suffit de cliquer sur le bouton « Enregistrer les modifications » en bas de la page pour que WordPress génère un nouveau fichier .htaccess.

Méthode 3 : Corriger l’erreur 403 Forbidden causée par les droits d’accès aux fichiers dans WordPress

Si les autres solutions n’ont pas corrigé l’erreur 403 forbidden sur votre site, les droits de fichiers incorrects en sont la cause la plus probable.

Tous les fichiers stockés sur votre site ont des droits sur les fichiers. Ces droits contrôlent qui peut accéder aux fichiers et dossiers de votre site WordPress.

Des droits de fichiers incorrects peuvent provoquer l’erreur 403 Forbidden. Elles font croire à votre serveur web que vous n’avez pas le droit d’accéder à ces fichiers.

Vous pouvez demander à votre fournisseur d’hébergement WordPress de vérifier que les droits d’accès aux fichiers de votre site sont corrects. Certains hébergeurs sont très supportables, ils n’y verront donc pas d’inconvénient et corrigeront probablement cela pour vous.

Modifier soi-même les droits des fichiers peut avoir de graves conséquences. Si vous ne vous sentez pas à l’aise pour le faire vous-même, il est préférable de demander de l’aide à un autre propriétaire de site WordPress ou de faire appel à un professionnel.

Toutefois, si vous souhaitez le faire vous-même, voici comment vérifier les droits de vos fichiers.

Connectez-vous simplement à votre site WordPress à l’aide d’un client FTP. Naviguez jusqu’au dossier racine contenant tous vos fichiers WordPress.

Checking file permissions

Cliquez pour sélectionner un dossier, cliquez avec le bouton droit de la souris, puis sélectionnez « Droits des fichiers » dans le menu.

Votre client FTP affichera une boîte de dialogue sur les droits des fichiers comme celle-ci :

Changing file permissions using FTP

Tous les dossiers de votre site WordPress doivent avoir un droit de fichier de 744 ou 755.

Par ailleurs, tous les fichiers de votre site WordPress doivent avoir un droit de 644 ou 640.

Vous pouvez définir le droit de fichier pour le dossier racine sur 744 ou 755. Vous devez également cocher la case située à côté de « Rechercher dans les sous-répertoires », puis cocher l’option « Appliquer uniquement aux répertoires ».

Cliquez simplement sur le bouton « OK ». Votre client FTP va maintenant commencer à définir les droits pour tous les sous-répertoires de ce dossier.

Une fois que c’est fait, vous devez répéter le processus pour tous les fichiers. Cette fois-ci, vous utiliserez un droit de fichier de 644 ou 640, et n’oubliez pas de sélectionner les options « Récurrence dans les sous-répertoires » et « Appliquer uniquement aux fichiers ».

Cliquez sur le bouton « OK » et votre client FTP commencera à définir les droits de tous les fichiers sélectionnés.

Essayez d’accéder à votre site maintenant et voyez si l’erreur 403 forbidden a disparu. Voilà, c’est fait !

Nous espérons que cet article vous a aidé à corriger l’erreur 403 forbidden sur WordPress. Vous pouvez également consulter nos astuces et hacks d’ experts pour protéger votre zone d’administration WordPress et notre article sur les raisons pour lesquelles nous utilisons Sucuri pour améliorer la sécurité de tous nos sites WordPress.

Si vous avez aimé cet article, veuillez alors vous abonner à notre chaîne YouTube pour obtenir des tutoriels vidéo sur WordPress. Vous pouvez également nous trouver sur Twitter et Facebook.

Divulgation : Notre contenu est soutenu par les lecteurs. Cela signifie que si vous cliquez sur certains de nos liens, nous pouvons gagner une commission. Consultez comment WPBeginner est financé, pourquoi cela compte et comment vous pouvez nous soutenir. Voici notre processus éditorial.

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.

L'ultime WordPress Toolkit

Accédez GRATUITEMENT à notre boîte à outils - une collection de produits et de ressources liés à WordPress que tous les professionnels devraient avoir !

Reader Interactions

162 commentairesLaisser une réponse

  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. Michael says

    Please somebody help me. I have two websites on the same host. I just added a third addon domain recently and installed wordpress to it through the softaculous installer.

    The problem is not from wordpress, and other websites on the same host is accessible.

    Please help.

  3. Andreas Johansson says

    I hade one page Forbiden 403 and tryied all the steps. And now i dont have permission to login wp-admin on my site? :-(

  4. Juliet Julius says

    Thank you so much for this article. My problem was a corrupted htaccess file. My website is now working fine.

  5. Aleli Sanchez Mendez says

    I still having this problem. I tried all the steps. The problem began when I installed the WooCommerce plugin in my WordPress Site. Now in my wordpress y receive a 403 Forbidden and in my other site, without wordpress i recieived a 502 Bad Gateway error.

    Please someone can help me?

  6. Scott Munson says

    I discovered – after all else failed and many hours spent, that at one time (but no longer) I used Bullet Proof security. It left a stray .htaccess file in my wp-admin folder – THAT, was causing the 403 error for me. ARGH!

  7. JU says

    There has to be a fourth step. None of these steps applied. The plugins weren’t the cause. The .htaccess file wasn’t the cause. All the permissions in all files and folders are set to the correct numerical values. :(

  8. Sendhil Kumar S K says

    Hi Friends, One Easy step will make You free from the existing problem.

    1. Go to CPanel of Your Domain

    2. Click to Expand public_html folder present at the extreme left of the screen.

    3. Double click on wp folder present on the write side of the screen

    4. Copy All files & Folders inside the wp folder

    5. Move all the files & folders inside the wp folder to UP ONE LEVEL

    6. Now All files & Folders are out of WP folder, hence WP folder is empty, come one level up & delete the empty WP folder

    7. Now go to browser & type your domain_name.com, PERFEFETLY it will be WORKING

    All the Best…if you have doubts regarding this mail me to

    Also if time permits visit my site
    Thank You All

  9. Sergio Casabona says

    Hi, there! Thanks for this article!
    I got this error, so I access with my ftp and deleted .htaccess file. I’m now able to access my dashboard. But when I go to settings and save again as you say, the error 403 comes back. What can I do?
    Thank you, guys!

  10. Josh Allen says

    What if I had a dedicated server, and its happening to all 43 of my sites…I just did some kind of WHM update on Bluehost, then it happened….Ive been waiting for an hour to talk to bluehost.

    • Ronald says

      Josh –

      I had a similar thing happening to me here. « All of a sudden » none of my sites worked anymore.

      I am hosting the sites on my own MacMini, running OS-X Server. After a night of trouble-shooting, I eventually found out that the root cause was me enabling the FTP server in OS-X Server. In there, I set folder permissions for the website root folder for « Everyone Else » to « None » (seemed a bit tricky to give everyone Read access to my sites!). Apparently one is also blocking the _www user access to the websites then…

      After I changed this back to « Read Only », my sites started working again… Pffff.

      I’m now looking for a permanent solution, which is not: « Close my firewall for FTP traffic.

      Hope this helps,
      Ronald

  11. shah faisal says

    You don’t have permission to access /loading.php on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request

  12. gab says

    I am getting the 403 error for my page and cannot even login into WordPress because of it… I don’t know how to fix it and don’t see anyone with the same issue.

  13. Reshan says

    Hi. My WordPress is handled by the hosting company itself. So I dont have root access. How can I solve this problem?

  14. Yves says

    Same problem here, and ftp same result… checked in Cpanel and noticed my maindir permissions was 0000 , changed to 0755 and was fixed

  15. Mimi says

    In my case, I had my website for 4 years and all of a sudden today I got this error although I did not touch the files or change any permissions. I logged into the control panel and noticed that for some reason the index.php file was missing from the WordPress root folder. I downloaded a new copy of WordPress and copied the index.php file on to the root folder of my WordPress website and the website came back!
    So perhaps if anyone is getting the same error, please double check that you have an index.php or index.html file. I hope that helps.

    • justin says

      Ditto…no idea why/how but the index.php disappeared while I was working on a project…I was saved a load of hassle by an automatic backup where the index still existed.

    • Nick says

      Thanks Mimi! This worked for me while the solutions in the article didn’t. In my case, the index.php file wasn’t actually missing but when I replaced the one that was there with a fresh one the site started working again so I guess it was corrupted or had some kind of other problem.

      My specific error message did also mention the index.php file so that also makes sense:

      Forbidden
      You don’t have permission to access /index.php on this server.

      Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    • Edgar says

      Nothing worked for me until I added « Options +FollowSymLinks » (without the quotes) above « RewriteEngine On ».

  16. Doni says

    I did all three possible causing 403 error fixing that you informed but it still produced the error. By the way i wanted to edit footer template but when i saved / updated file it produced « 403 Forbidden Access to this resource on the server is denied! »

    • Mimi says

      This is a reply to your comment on wpbegginer.com (comment quoted below)
      I am not sure if you were able to resolve your problem but I would like to let you know that I got the same error today and I found that the problem was a missing index.php file from the root folder of my website.

      ———————————————————————–
      « I did all three possible causing 403 error fixing that you informed but it still produced the error. By the way i wanted to edit footer template but when i saved / updated file it produced “403 Forbidden Access to this resource on the server is denied!” »

  17. Alexandra says

    Hello,

    I need help, while trying install wordpress with mamp, after i did everything what i supposed to do, it showed me this error :
    ‘Forbidden

    You don’t have permission to access /mysite on this server.
    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.’

    Please help me!

  18. Vasil says

    Hello guys.

    Forbidden

    You don’t have permission to access /shop/ on this server.

    I’ve tried everything and doesn’t work.
    if someone can help would be great thank you.

  19. KimD says

    Thanks. Great article. To fix my problem I had to do a slight variant on what was written. When I looked I found that I had two htaccess files, one in the root directory and another in the wp-admin directory. I regained access to my site by renaming the htaccess file in the wp-admin directory.

  20. Steve says

    I have a user who is getting the following 403 when he tries to leave a comment:

    403 Forbidden Error Page

    If you arrived here due to a search or clicking on a link click your Browser’s back button to return to the previous page. Thank you.

    IP Address: xxx.xx.xx.xx” (his actual IP address shows up here)

    What could be wrong?

  21. Omotayo Adeoye says

    Hi,
    I get a ‘Forbidden’ on the wp-admin page of my website. It doesn’t say error 403 – forbidden; it just says forbidden ».

    I have re-installed wordpress, checked file permissions, checked htpaccess, deactivated all plugins etc. yet it doesn’t work.

    Pls what can i do!

    Thanks a lot.

  22. Ricardo says

    Hi! When I share my website link to facebook, the title is 403 Forbidden. Directly on my website I didn’t saw any kind of 403 forbidden message. I tried a lot of advises I found, as removing .htaccess file, desactivating all the plugins and also checked permissions. I tried to debug at facebook debugger, but the informations doesn’t change. Anyone can help me to fix this problem?

  23. Javier Gomez says

    I have many errors 403 with my images, I will take your advice thanks for the information

    An apology for my bad english

  24. Christopher Sowerby says

    Hi. my problem is that i can logout from the backend dashboard but i cant logout from the front end (using the bar at the top).

    It seems that the nonce in the logout url is different when on the backend. Do you know why this could be? i have cleared everything out of my functions.php but it still happens.

  25. Rameez Ramzan says

    Hi,

    I am newbie in WordPress and Currently I am facing some problem while login WordPress Dashboard.
    It’s showing 403 forbidden errors while login but on the other side my friend open similar site on their internet then its working correctly. Kindly let me know

    Thanks,

  26. Erik Kubica says

    I have similar issue, as a company on our dev server we are running much wordpress sites where to only 1 WP site i started to get 403 and only on wp-admin. 2 Days before i have lived elsewhere when it worked.

    foo.bar/somewebsite/* -> 200 OK
    foo.bar/somewebsite/wp-admin -> rediret to wp-login.php -> 403 err

    foo.bar/somewebsite2/* -> 200 OK
    foo.bar/somewebsite2/wp-admin -> rediret -> 200 OK

    Ftp to foo.bar is ok, ssh to foo.bar is ok.

    On « somewebsite » the WP admin is blocked only for me (all browsers, all existing incognito modes, all cache cleared incl. cookies….). For all people i have asked to try it worked without any problems.

    There is nothing wrong with htaccess, wordfence was disabled from ftp (also checked the DB if there is any ban to my IP). checked the main apache2 access log over ssh where i see the 403 record.

    Any idea what can be wrong?

  27. Vinish Chaudhary says

    Forbidden

    You don’t have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    and none of above method work on this error my cpanel not showing. I read the whole article
    plz, help me solve this.
    thanks

  28. Dewlance says

    Uhh! WordPress wp-admin 403 error is really time killing.

    I try your all tricks but still getting a error. Going to change wp-admin folder with fresh files of wp-admin files.

    Maybe it will help me or other option is apache configuration or poorly mod_security configuration.

  29. Greg says

    We work with WordPress everyday and recently encountered the 403 error. It was the file permissions and htaccess file that was reconfigured due to one of the security plugins. Your post on the matter was very helpful. Thanks for taking the time to post it.

  30. zulfiqar ali says

    dear sir my site name is my site give me error like

    Forbidden

    You don’t have permission to access / on this server.

    Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

    and non of above method work on this error my cpane not showing any files in file explorer and also not connecting via FTP client.. i read whole article
    plz help me solve this..
    thanks

  31. Oliver says

    Hi, we have also been experiencing a 403 error. It first started happening when I tried to update the wp-core to 4.5. Ever since we get a 403 about once a day. I have done everything that I can think of to rectify the issue; reverted to a back-up of the site previous to the update; deactivated all plugins; checked file permissions; contacted hosts to see if our IP addresses were blacklisted; deleted .htaccess; changed theme to default 2016 the only thing that works when getting a 403 is to turn off the router wait for the IP to change and then we can access again. So it would seem to be an IP issue but I cannot find where this is IP blockage is.

    Does anybody know of any other place where an IP blacklist maybe?

    Thanks.

  32. Barbara Puchala says

    We just had this error. A outside web designer was creating a WordPress site for us and kept getting the 403 error.
    Turns out our hosting company, as part of its security measures, has its servers block any attempt to sign in with the user name ‘Admin’. I know, you would think he would know better. A change to the user name was all that was needed.

Laisser une réponse

Merci d'avoir choisi de laisser un commentaire. Veuillez garder à l'esprit que tous les commentaires sont modérés selon notre politique de commentaires, et votre adresse e-mail ne sera PAS publiée. Veuillez NE PAS utiliser de mots-clés dans le champ du nom. Ayons une conversation personnelle et significative.