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

WordPressの403 Forbiddenエラーを修正する方法

編集メモ: WPBeginner のパートナーリンクから手数料を得ています。手数料は編集者の意見や評価に影響を与えません。編集プロセスについて詳しく知る。

WordPressサイトの403 Forbiddenエラーにお困りですか?

403 Forbiddenエラーは、WordPressサイトのオーナーが遭遇する可能性のある最も迷惑なエラーの1つです。WordPress の管理エリアやサイトの特定のページにアクセスできなくなることがあります。

この投稿では、WordPressの403 Forbiddenエラーを簡単に修正する方法を紹介します。

Fixing 403 Forbidden error in WordPress

WordPressの403 Forbiddenエラーとは?

403 Forbiddenエラーは、サーバー権限でWordPressサイトの特定のページにアクセスできない場合に表示されます。

このエラーには通常、文章が添えられている:

403 Forbidden – このサーバーの ‘/’ にアクセスする権限がありません。

さらに、リクエストを処理するためにErrorDocumentを使用しようとして403 Forbiddenエラーが発生しました。

これがその例だ:

403 Forbidden status code shown on a WordPress site

このエラーが表示されるシナリオはさまざまです。例えば

また、完全な403 Forbidden状態ではなく、‘Access Denied’と表示されることもあります。あるいは、「yourdomain.comへのアクセスが拒否されました。このページを表示する権限がありません。

WordPressのエラーコードについての詳しい説明は、WordPressの最も一般的なエラーとその修正方法のリストをご覧ください。

403エラーの種類を知ったところで、その原因について説明しよう。

WordPressの403 Forbiddenエラーの原因は?

403 Forbiddenエラーは、サーバーが特定のページへのアクセスを許可していない場合に表示されます。これが発生する原因はいくつかあります。

WordPressの403 Forbiddenエラーの一般的な原因のひとつは、セキュリティプラグインの設定が不十分であることです。WordPressのセキュリティプラグインの多くは、悪意のあるIPアドレス(またはIPアドレスの範囲全体)をブロックすることができます。

別の原因として、サーバーの.htaccessファイルが壊れているか、ファイルの権限が正しくない可能性があります。

WordPressのホスティングサービス会社は、サーバーの設定を誤って変更することがあります。その結果、サイトに 403 Forbidden エラーが表示されることがあります。

とはいえ、WordPressの403 forbiddenエラーを修正する方法を見てみましょう。

注意: 何かをする前に、WordPressサイトの完全なバックアップを作成することをお勧めします。WordPressサイトのバックアップ方法については、こちらのガイドをご覧ください。

WordPressの自動バックアッププラグインを使用している場合は、先に進む前に最新のバックアップにアクセスできることを確認してください。

特定のメソッドにスキップしたい場合は、これらのクイックリンクを使用できます:

動画チュートリアル

Subscribe to WPBeginner

文章での説明がお好きな方は、そのまま読み進めてください。

方法1:プラグインを一時的に無効化する

まず最初にすべきことは、WordPressプラグインの1つが403 forbiddenエラーの原因になっていないか確認することです。そのためには、WordPressプラグインをすべて一時的に無効化する必要があります。これには、サイトにインストールされているセキュリティ・プラグインも含まれます。

Bulk deactivate all WordPress plugins

これで問題を解決した場合は、サイトのプラグインのいずれかがこのエラーを引き起こしていたことになります。

403 Forbiddenエラーが再現されるまで、すべてのプラグインを1つずつ有効化することで、どのプラグインがエラーの原因になっているかを突き止めることができます。その後、問題のプラグインを削除し、代わりのプラグインを探すか、開発者に連絡してサポートを受けてください。

この方法がうまくいかない場合は、そのまま読み進めてほしい。

方法2:.htaccessファイルを再生成する

多くの場合、403 forbiddenエラーはWordPressサイトの.htaccessファイルが破損していることが原因です。このファイルを修正するのはとても簡単です。

まず、FileZillaやcPanelのファイルマネージャーアプリのようなFTPクライアントを使用してサイトに接続する必要があります。

次に、WordPressサイトのルートフォルダーにある.htaccessファイルを探します。WordPressフォルダーに.htaccessファイルが見つからない場合は、こちらのガイドを参照してください。

.htaccessファイルをコンピューターにダウンロードし、新しいバックアップを取っておく必要があります。その後、サーバーからファイルを削除してください。WordPressはそのまま動作しますのでご安心ください。

Delete .htaccess file from your WordPress site

では、サイトにアクセスしてみてください。403 forbiddenエラーが問題を解決した場合、.htaccessファイルが破損していることを意味します。

WordPressの管理エリアにログインし、設定 ” パーマリンクのページにアクセスすることで、新しい.htaccessファイルを生成することができます。

Regenerating .htaccess file in WordPress

ページ下部の「変更を保存」ボタンをクリックするだけで、WordPressが新しい.htaccessファイルを生成します。

方法3:ファイル権限を修正する

他の解決策を試してもサイトの403 forbiddenエラーが直らない場合、ファイル権限の誤りが最も可能性の高い原因です。

サイトに保存されているすべてのファイルにはファイル権限があります。これらのファイル権限は、WordPressサイト上のファイルやフォルダーにアクセスできる人をコントロールします。

ファイルの権限が正しくないと、403 forbidden エラーが発生することがあります。これは、ウェブサーバーに、あなたがそのファイルにアクセスする権限を持っていないと思わせるものです。

WordPressのホスティングサービスプロバイダーに、あなたのサイトのファイル権限が正しいかどうかチェックしてもらうことができます。ホスティングサービスによってはとても協力的なので、気にせず修正してくれるでしょう。

ファイルの権限を自分で変更すると、深刻な結果を招く可能性があります。自分でやる自信がない場合は、WordPressサイトのオーナー仲間に助けを求めるか、プロに依頼するのが一番です。

しかし、もし自分でやりたいのであれば、ファイルの権限をチェックする方法を紹介しよう。

FTPクライアントを使用してWordPressサイトに接続します。WordPressのファイルがすべて入っているルートフォルダーに移動します。

Checking file permissions

クリックしてフォルダーを選択し、右クリックしてメニューから「ファイル権限」を選択します。

FTPクライアントは、このようなファイル権限ダイアログボックスを表示します:

Changing file permissions using FTP

WordPressサイト上のすべてのフォルダーのファイル権限は744または755でなければなりません。

一方、WordPressサイトのすべてのファイルの権限は644または640でなければなりません。

ルートフォルダーのファイル権限を744または755に設定できます。また、’Recurse into subdirectories’の隣にあるボックスにチェックを入れ、’apply to directories only’というオプションにチェックを入れる必要があります。

OK」ボタンをクリックしてください。FTPクライアントは、フォルダー内のすべてのサブディレクトリーの権限設定を開始します。

それが完了したら、すべてのファイルに対してこのプロセスを繰り返す必要がある。今回は、644または640のファイル権限を使用し、「サブディレクトリに再帰する」とファイルのみに適用する」オプションを選択することを忘れないでください。

OK’ボタンをクリックすると、FTPクライアントが選択したすべてのファイルのファイル権限の設定を開始します。

今すぐサイトにアクセスして、403 forbiddenエラーが消えたかどうか確認してください。

方法4:キャッシュとCookieをクリアする

シンプルな修正が最も効果的な場合もあります。ブラウザーキャッシュとCookie、そしてキャッシュプラグインを使用している場合はWordPressのキャッシュをクリアすることで、403 forbiddenエラーを解決することができます。

コンピューターが読み込み時間を短縮するために一時ファイルを保存するのと同じように、ブラウザーもサイトのデータをキャッシュします。このデータが破損すると、互換性の問題を引き起こし、403エラーにつながる可能性があります。

同様に、プラグインによって生成されたキャッシュが破損している場合も、サーバーがリクエストを誤って解釈する可能性がある。

キャッシュプラグインの中には、特定のページやユーザー権限グループへのアクセスを制限できる高度な設定を提供しているものもあります。これらの設定が誤って設定された場合、意図せずサイトの特定の部分へのアクセスをブロックしてしまう可能性があります。

ブラウザのキャッシュをクリアするには、主要なブラウザのキャッシュをクリアする方法の投稿の指示に従ってください。

WordPressのキャッシュプラグインを使用している場合は、WordPressのキャッシュをクリアする方法のガイドをご覧いただき、プラグインのドキュメンテーションを参照してください。

方法5:CDN(コンテンツデリバリーネットワーク)を一時的に無効化する。

ウェブサイトのパフォーマンスを向上させるためにコンテンツデリバリーネットワーク(CDN)を使用している場合、それが干渉して403 forbiddenエラーを引き起こしている可能性があります。

CDNは、あなたのサイトのサーバーと訪問者の間の仲介役として機能し、より速いロード時間のために地理的に分散した場所からキャッシュされたコンテンツを提供します。

CDNが原因かどうかを確認するには、CDNを一時的に無効化してください。その後、サイトをテストしてエラーが消えるかどうかを確認してください。

CDNを無効化することでエラーが解決する場合は、CDNプロバイダーのサポートチームに連絡してトラブルシューティングを行う必要があります。

方法6:マルウェアをチェックする

悪意のあるソフトウェアは、403 forbiddenエラーを含むさまざまな問題を引き起こす可能性があります。ファイルの権限を妨害したり、悪意のあるコードを注入したり、サイトとサーバー間の通信を妨害したりします。

ウェブサイトにマルウェアがあるかどうかを確認するには、セキュリティプラグインやWordPressホスティングサービスを使用してサイトをスキャンすることをお勧めします。

評判の良いセキュリティプラグインの多くは、マルウェアスキャン機能を提供しており、通常はワンクリックでこれらの悪意のあるファイルを削除することができます。

さらに詳しくWordPressのよくあるエラーを解決する方法

WordPressに関するその他の問題がありますか?もしかしたら、これらのガイドのどれかが問題解決の助けになるかもしれません:

この投稿が WordPress の 403 forbidden エラーの修正に役立てば幸いです。よくあるブロックエディターの問題や、サイトを成長させるために必須のWordPressプラグインのリストもご覧ください。

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.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

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.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

162件のコメント返信を残す

  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. Gary Parker says

    None of these fix my problem as it is one page and the only way i could fix it was to rename the permalink, The page in trouble is https://example.com/blog/ and the only way i could fix it was to change it to /blog2/, any ideas?

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

  4. 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? :-(

  5. Juliet Julius says

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

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

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

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

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

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

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

  12. Krishna Patel says

    This post saved my life! I can’t thank you enough for this helpful information but.. thanks a million :)

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

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

  15. Reshan says

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。