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

      管理者

  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.

      管理者

  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.

      管理者

  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.

      管理者

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

      管理者

  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.

      管理者

  10. Mohd Anwar says

    I have done all the thing read in this article yet the problem persist is there any other solution?

    • WPBeginner Support says

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

      管理者

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

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

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

      管理者

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

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

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

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

      管理者

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

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

      管理者

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

      管理者

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

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

      管理者

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

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

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

  26. ItsMisterDavid says

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

返信を残す

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