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の重大なエラーを修正する方法(ステップバイステップ)

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

WordPressサイトに重大なエラーが表示されていませんか?

WordPressでは、「このサイトで重大なエラーが発生しました。サイト管理者の受信トレイで指示を確認してください。WordPressのデバッグガイドへのリンクも表示されます。

このガイドでは、WordPressの重大なエラーを修正する方法を紹介します。また、このエラーの原因と回避方法についても説明します。

Fixing the critical error in WordPress

WordPressのクリティカルエラーとは?

WordPressのクリティカルエラーとは、WordPressが正しく動作するために必要なスクリプトをすべて読み込めなくなるエラーのことです。

以前は、このWordPressエラーは 死の白い画面や致命的なエラーメッセージが画面に表示されていました。ほとんどの初心者はあまり役に立たず、自分で問題を解決しようと悪戦苦闘していました。

WordPress 5.2以降、ユーザーには一般的なエラーメッセージが表示されるようになりました:このサイトで重大なエラーが発生しました。サイト管理者のメール受信トレイで指示を確認してください」という一般的なエラーメッセージと、WordPress デバッグガイドへのリンクが表示されます。

Critical error in WordPress

また、WordPressサイトの管理者メールアドレスにメールを送信します。

このメールには、エラーの原因となっているプラグインやテーマの詳細と、リカバリーモードでWordPressダッシュボードにアクセスするためのリンクが含まれています。

WordPress recovery mode email

このエラーの別の種類は、あなたのサイトが重大なエラーに直面していることを示すだけです。メールアドレスを確認するように指示することはありません。

これは、WordPressがリカバリーモードを使用可能にしたり、メールを送信したりするために必要なファイルをロードできなかったために起こる可能性があります。

Critical error in WordPress without email instructions

WordPressのクリティカルエラーの原因は?

WordPressのクリティカルエラーは、一般的にプラグイン、スクリプト、またはWordPressが正しく機能しないコードの誤動作が原因で発生します。

コードの誤動作により、WordPressは必要なファイルを読み込むことができません。

チュートリアルのコードスニペットをコピー&ペーストしてサイトに貼り付けた場合、重大なエラーが発生する可能性があります。

WordPressのトッププラグインはすべて徹底的にテストされているため、重大なエラーを引き起こす可能性は低くなっています。しかし、他のWordPressプラグインとの競合やカスタマイザーコードがエラーの引き金になることがあります。

WordPressの重大なエラーを修正し、サイトを取り戻す方法を見てみましょう。

WordPressのクリティカルエラーを修正する(2つの方法)

致命的なエラーメッセージそのものは、問題の原因を見つけて修正するのにはあまり役に立ちません。幸いなことに、WordPressはサイトの管理者メールアドレスにもメールを送信します。

多くのWordPressサイトは、SMTPを使用してメールを送信するように設定されていません。このため、WordPressがメールを送信したと伝えているにもかかわらず、メールが届かないことがあります。

同様に、WordPressサイトによっては、メールを確認する指示なしに重大なエラーメッセージだけが表示されることがあります。これは、WordPressがメールを送信するために必要なファイルをロードできなかったか、リカバリーモードを利用できなかったためです。

そんなユーザーもご安心ください。メールがなくても重大なエラーを修正する方法をご紹介します。

一方、WordPressの技術的問題のメール通知を受け取った場合は、その意味を理解し、サイトを復活させるために使用する方法を紹介します。

下のリンクをクリックすると、必要なセクションに直接ジャンプできます:

WordPressデバッグメールでクリティカルエラーを修正する

まず、あなたのサイトのWordPress管理者メールアドレスの受信トレイにアクセスする必要があります。

管理者用メールとして使用したメールアドレスがわからなくなっていませんか?WordPressをインストールする際に入力したメールアドレスです。

あなたのサイトがBluehostを使用しているか、WordPressの自動インストーラを使用した場合、管理者メールアドレスは、おそらくWordPressのホスティングアカウントに使用したものと同じものです。

受信トレイに「お客様のサイトに技術的な問題が発生しています」という件名のメールが届きます。このメールには、WordPress サイトで重大なエラーが発生した原因について、より役立つ情報が記載されています。

例えば、以下のスクリーンショットは、テストサイトのWordPressテーマが原因で重大なエラーが発生したことを示しています。

Critical error caused by a WordPress theme

メールには、リカバリーモードでWordPressサイトにログインし、問題を調査および修正するための固有のリンクも含まれています。

メールの下部には、エラーの原因となった特定のファイルやコードなど、エラーに関するさらに詳細な情報が表示されます。

以下の例では、テーマのfunctions.phpファイルの614行目にあるコードがエラーを引き起こしています。

Recovery email error details

WordPressプラグインの不具合によるエラーの例です。

ご覧のように、メッセージはプラグイン名とエラーの原因となっているコード行を強調表示します。

Plugin error details

WordPressのリカバリーモードへのリンクをクリックすると、WordPressの管理エリアに移動します。

続行するにはログインを求められます。

Recovery mode login

ログイン中、クリティカルエラーについての通知、エラーの原因、エラーを修正するためのリンクが表示されます。

例えば、以下のスクリーンショットでは、WordPressはプラグインページへのリンクとともに、プラグインによって引き起こされた重大なエラーを通知している。

WordPress recovery mode dashboard

リンクをクリックすると、問題のプラグインが表示されます。また、エラーの原因となったコードの行も表示されます。

無効化」をクリックして、プラグインを無効化することができます。

Deactivate plugin

その場合は、別のWordPressプラグインを探すか、プラグイン開発者からサポートを受けられるかどうかを確認すればよい。

同様に、問題がテーマにある場合は、テーマページへのリンクが表示されます。ページの下部には、どのテーマが問題を引き起こしているかが表示されます。

Broken theme

WordPressのテーマを変更することができます。あるいは、壊れたテーマを削除し、公式のソースから新しいテーマを再インストールして、問題が解決するかどうかを確認することもできます。

問題に対処したら、上部にある「リカバリーモードを終了」ボタンをクリックします。

Exiting the recovery mode in WordPress

ほとんどの場合、WordPressサイトは正常に動作するようになります。

それでもWordPressで重大なエラーが表示される場合は、次のセクションのトラブルシューティングをお試しください。

WordPressのクリティカルエラーを手動で修正する(メールなし)

WordPressの重大な問題の通知メールが届かなかった場合、この方法でWordPressの重大なエラーのトラブルシューティングと修正方法を学ぶことができます。

エラーの原因が最近行った操作にある場合は、その操作を取り消すことで問題を解決できます。

例えば、新しいプラグインをインストールし、有効化したために重大なエラーが発生した場合、そのプラグインを無効化する必要があります(以下の最初のステップでその方法を説明します)。

一方、エラーの原因がわからない場合は、以下の手順に従ってください。

1.WordPressのプラグインをすべて無効化する。

WordPressの重大なエラーの一般的な原因は、プラグインの競合やプラグインの非互換性です。これを解決するには、単に無効化することによって、障害のあるプラグインを無効にする必要があります.

しかし、クリティカルエラーのため、管理エリア(WordPressのバックエンド)にアクセスすることができず、どのプラグインを無効化すればよいかもわかりません。

これに対処するため、WordPressのプラグインをすべて無効化します。ご心配なく。WordPressの管理エリアにアクセスすれば、簡単に再アクティブ化できます。

FTPクライアントまたはウェブホスティングコントロールパネルのファイルマネージャーアプリを使用してWordPressサイトに接続するだけです。

接続したら、wp-contentフォルダーに移動する必要があります。

Rename plugins folder

wp-contentフォルダーの中に’plugins’というフォルダーがあります。それを右クリックし、「名前の変更」オプションを選択する必要があります。

次に、’plugins’フォルダー名を好きなものに変更してください。この例では、「plugins.無効化」と呼ぶことにする。

WordPressは有効化したプラグインをサイトに読み込むためにプラグインフォルダーを探します。プラグインフォルダーが見つからない場合、有効化することができず、自動的に無効化されます。

これでサイトにアクセスして、重大なエラーメッセージが消えたかどうかを確認できる。

重要です:クリティカルエラーの問題を解決した場合は、「plugins」フォルダーの名前を変更することを忘れないでください。WordPressはこのフォルダを認識し、WordPressダッシュボードからプラグインを1つずつ再アクティブ化することで、クリティカルエラーの原因となったプラグインを特定することができます。

詳しくは、WordPressプラグインをすべて無効化する方法のチュートリアルをご覧ください。

2.デフォルトテーマに切り替える

クリティカルエラーのトラブルシューティングの次のステップは、WordPressテーマを初期設定に切り替えることです。現在のWordPressテーマのコードが問題を引き起こしている場合は、この方法でクリティカルエラーの問題を解決できます。

WordPress.orgのテーマディレクトリに行き、Twenty Twenty-TwoやTwenty Twenty-Threeのような初期設定のテーマをダウンロードするだけです。

Download a default theme

次に、テーマファイルをコンピューターに解凍する必要があります。

これでコンピューターにテーマ名のフォルダーが作成されます。

Extract theme files

次に、FTPクライアントまたはホスティングコントロールパネルのファイルマネージャーアプリを使用してWordPressサイトに接続する必要があります。

接続が完了したら、/wp-content/themes フォルダーに移動すると、サイトにインストールされているすべてのテーマのリストが表示されます。

Download themes as backup

これらのフォルダーをすべてバックアップとしてコンピューターにダウンロードしてください。

その後、サイトからテーマフォルダーをすべて削除する必要があります。

Delete themes

WordPressサイトにはテーマがインストールされていません。

これを修正するには、以前にダウンロードした初期テーマフォルダーをアップロードします。

Upload theme folder

このプロセスが終了したら、サイトにアクセスしてみてください。

WordPressテーマが原因で重大なエラーが発生した場合は、エラーメッセージが消え、サイトにアクセスできるようになっているはずです。

3.WordPressの再インストール

WordPressのコアファイルの破損やマルウェアも、WordPressの重大なエラーを引き起こす可能性があります。これを解決する最も簡単な方法は、WordPressを再インストールすることです。

WordPress.orgにアクセスし、新しいWordPressをコンピューターにダウンロードするだけです。

ファイルをダウンロードしたら、コンピューターに解凍する必要があります。すると、再インストールに必要なすべてのファイルが入った「WordPress」というフォルダーが作成されます。

WordPress files

次に、FTPクライアントまたはホスティングアカウントのダッシュボードまたはcPanel(コントロールパネル)のファイルマネージャーアプリを使用してWordPressサイトに接続します。

接続したら、サイトのルート・フォルダーに移動します。これは、wp-admin、wp-content、wp-includes、およびwp-adminフォルダを含むフォルダです。

Upload core WordPress files

コンピューター上の「WordPress」フォルダー内のファイルを選択し、サイトにアップロードします。

FTPクライアントが、これらのファイルを上書きするかスキップするかを尋ねてきます。上書き」を選択し、「常にこのアクションを使用する」にチェックを入れる必要があります。

Overwrite core files

次に、「OK」ボタンをクリックして続行します。FTPクライアントが、WordPressのコアファイルをコンピューターからコピーしたものに置き換えます。

完了したら、サイトにアクセスしてみて、エラーが解決するかどうか確認してください。

WordPressコアファイルの破損やマルウェアが原因で重大なエラーが発生した場合は、エラーメッセージは表示されなくなります。

4.WordPressのデバッグをオンにする

WordPressには、エラーをキャッチし、ログファイルに保存し、問題をトラブルシューティングできるデバッグシステムがビルトインされています。

これを有効にするには、wp-config.phpファイルを編集してデバッグ・モードを有効化する必要があります。以下の行を探してください:

define( 'WP_DEBUG', false );

では、この行を次のコードに置き換えてください:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_DISPLAY', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );

WordPressサイトにアクセスすると、デバッグ情報と重大なエラーメッセージが表示されます。

Debug critical error

デバッグモードは、PHPのエラーだけでなく警告や通知も表示します。これは、問題の原因を突き止め、それを修正するのに役立ちます。

また、エラーログをdebug.logファイルに保存し、そのファイルを/wp-content/フォルダに保存します。

5.PHPのメモリ制限を増やす

ホスティングウェブサーバーは他のコンピューターと同じです。複数のアプリケーションを同時に効率的に実行するにはメモリが必要です。

サーバーにPHPを実行するのに十分なリソースがない場合、クラッシュしたり応答しなくなったりすることがあります。これはWordPressのクリティカルエラーを引き起こす可能性があります。

これを解決するには、ホスティングサービスサーバーにPHPにより多くのメモリを使用するように指示することで、PHPのメモリ制限を増やすことができます。

そのためには、wp-config.phpファイルに以下の行を入力します。

define( 'WP_MEMORY_LIMIT', '512M' );

変更を保存してサーバーにアップロードすることを忘れないでください。

詳しくは、WordPressのPHPメモリ制限を増やす方法のチュートリアルをご覧ください。

さて、これで重大なエラーが解決したかどうか、サイトにアクセスしてみてください。

6.PHPバージョンのアップグレード状況

WordPressにはPHPバージョン7.4以上が必須です。WordPressホスティングサービスサーバーが古いバージョンのPHPを使用している場合、うまく動作せず、重大なエラーを引き起こす可能性があります。

WordPressのリカバリーモードにアクセスできる場合は、ツール ” サイトの健全性ページにアクセスし、情報タブに切り替えることで、サイトが使用しているPHPバージョンを確認できます。

How to check the PHP version on your WordPress website

ここからサーバーセクションまでスクロールダウンし、クリックして展開する。

そこに、ホスティングサービスサーバーにインストールされているPHPのバージョンが表示されます。

Find PHP version

7.4より低い場合は、PHPのバージョンを更新する必要があります。

ほとんどの優れたWordPressホスティングサービス会社では、ホスティングアカウントのコントロールパネルから簡単に行うことができます。詳細については、人気のあるWordPressホスティングサービスプロバイダーでPHPバージョンを更新する方法の投稿を参照してください。

この投稿が WordPress の重大なエラーのトラブルシューティングと修正のお役に立てば幸いです。WordPressサイトの無料SSL証明書の取得方法や、中小企業に最適なビジネスフォンサービスの専門家による比較もご覧ください。

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

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

  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. Elliot Walker says

    Thanks for the guide. Do you know if there is a tool to monitor and notify me if my site has a WordPress error like this? Can an UpTime monitor tell if a page is not navigable and is displaying such messages?

  3. rahul says

    I got the critical error message and I can’t view my website. I signed into my cPanel and went to the plug-ins folder in the file manager. When I right click on the plug-ins folder there is no “rename” option to select. I don’t know what to do to get my website back.

    • WPBeginner Support says

      Your hosting provider may have customized their file manager. You would want to try right-clicking the file or reaching out to your hosting provider and they should be able to assist!

      管理者

  4. AhmanPg says

    Updating to the newest PHP versions often resolves the issue, since some new plugin updates wont work with older PHP vers

    • WPBeginner Support says

      Not always, sometimes a plugin or theme may not be set up to work with the newest version of PHP but that can help in some situations :)

      管理者

  5. Bert Beckers says

    I’m having this issue on a multisite install. After deleting some outdated (and unsupported) plugins, suddently one of my sites showed this error. Is there any way to get into the admin panel without the automated email?

    • WPBeginner Support says

      You would want to take a look at the second method in this guide for troubleshooting without the email.

      管理者

  6. Keith says

    This post is still really helpful. LIFE SAVER! Removing and re-introducing the plugins worked! Thanks so much for providing this information.

  7. Marie says

    I get this error on one page only. When a WPforms form is submitted. I’ve done everything on this page and still get the error on that one page. The form does actually work despite users getting this error

    • WPBeginner Support says

      We would recommend reaching out to WPForms’ support directly if that is the plugin causing the error and they can help troubleshoot the error.

      管理者

  8. Mel says

    I am working on a test site for the company I work for. I got the critical error message but no email. I can’t figure out how to get back on my site to fix it as all I see is the message itself. Thank you!

  9. Herbert Thiel says

    Thank you so much for being here. It seems whenever I have an issue and I Google it I wind up here to get the right (helpful) answer. So now I come here first.

  10. Paul says

    This is an excellent tutorial and enabled me to get my ancient website up and running again – caused by out of date plugins. Thank you so much.

  11. Carlos Rodriguez says

    Thanks for this article, it was very helpful, WP should send this link rather than the one they send on a critical error link they send.

    Cheers!

  12. Lynda says

    I am so very happy that I found this resource page. It was really helpful and saved me from paying someone to fix the issue. I followed the instructions under “Manually (Without Email)”. Use my host site to make the changes to the plugins folder as per the instructions and IT WORKS!!!
    THANK YOU SO MUCH!

  13. Abby says

    Thanks for this, really helpful. I deleted the plugin using the manual method, renaming the plugin folder, saving me a ton of time!

  14. Rob Mccolley says

    In item #3 above, there’s no step-by-step for the File Manager method of reinstalling WordPress.

    You write that either FTP or File Manager can be used, but offer steps for FTP only. Did I miss something?

    Thanks.

    • WPBeginner Support says

      The file manager varies between hosting providers which is why we do not have a detailed guide on how to use it at the moment. If you check with your hosting provider they should be able to assist you :)

      管理者

  15. Sudeep says

    Hi… thanks for such a nice post.

    I renamed my Plugins folder to Plugins.deactivate, and after that I could log into my dashboard. But as soon as I rename the Plugins.deactivate back to Plugins, I get out of my site, and the error message comes back.

    What should be the next step? It seems that the problem is with the Plugins folder, but how do I use it if I cannot rename it back to its original?

    ~ Sudeep

    • WPBeginner Support says

      For that issue, it seems like one of your plugins is having a major error, you could manually create a plugins folder and move the individual plugins back into the plugins folder to find which of your plugins is the root of the error.

      管理者

  16. RAGHUL DHARMARAJAN says

    I got the e-mail with the WordPress recovery mode link. But it’s just opening my broken website only – not the WordPress recovery mode login page. The link is not expired.

    • WPBeginner Support says

      It sounds like the recovery email is not working properly in which case we would recommend using the second method from this guide.

      管理者

  17. Carly says

    Thank you so much for this amazing post! It was momentarily very stressful to have my website down but these clear, easy instructions helped to keep me calm and I was able to fix it quickly.

  18. Margaret agard says

    thank you so much! Got an email from google at 2 AM saying my site couldn’t be indexed. Got the critical error and followed your instructions.

    When I renamed the plugin folder back still got the error so I I actually had to rename each plugin file and then test each one until I found the one that caused the problem

    Again thank you. Was going to be on a show that day sending people to the website! Now it’s working and I can go back to sleep. Big smiles here!

  19. Jamesetta says

    I tried but it did not work. I got as far as the renamed plugin but could not find the plugins afterwards to reactivate. It got a bit confusing. I hope my site comes back up because everything went crazy even after I renamed to plugins again.

    • WPBeginner Support says

      To have your plugins available again you would want to revert the name of the plugins that you changed to their original names and they should appear again.

      管理者

  20. Stefanie says

    You can always be counted on when I need you! I was getting the critical error but never got the email so was clueless. I followed your steps (although I panicked for a moment after I renamed the folder) and sure enough-I found the plugin causing the problems.

    Thank you so much for your help

  21. Dennis says

    Just wanted to say thanks for this clear article. It’s all you need to know in this situation. Resolved this issue with this, saving me a lot of googling, and life’s too short for googling :-).

  22. momin says

    what should I do when I try to install a plugin or any theme and my WordPress website show a critical situation on the to bar.
    I’ll fix it earlier now if I install every theme it appears again.. please let me know what can do?

  23. Christine says

    I got the critical error message and I can’t view my website. I signed into my cPanel and went to the plug-ins folder in the file manager. When I right click on the plug-ins folder there is no “rename” option to select. I don’t know what to do to get my website back.

返信を残す

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