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

WordPressで500内部サーバーエラーを修正する方法

あなたのWordPressサイトは完璧に動作していました。ホームページの代わりに500 Internal Server Errorが表示されたのです。警告もなく、明確な説明もなく、ただイライラする行き止まりです。😨

私たちはその気持ちを知っています。サイトがダウンし、その原因がわからず、気持ちが沈む瞬間。WordPressのエラーの中でも最も一般的なもののひとつですが、最も謎めいたものでもあります。何が悪いのかがわからず、ただ何かが壊れているというだけなのです。

良いニュースは?ほとんどの場合、修正可能です。数え切れないほどのカスタマイザーをサポートしてきた私たちは、このエラーに何度も対処してきました。

このガイドでは、サイトを復旧させるための正確な手順を説明します。このガイドに従うだけで、すぐにすべての作業を再開することができます。

Fixing the internal server error in WordPress

この投稿で取り上げるトピックを簡単に紹介しよう:

500内部サーバーエラーとは何ですか?

500 Internal Server Errorは鍵のないドアのようなものです。何かが間違っていることはわかるが、何が起こったのかを説明するメモがない。

このエラーはWordPressだけの問題ではありません。サーバーが対処方法を知らない問題に遭遇したときに、どのサイトにも外観が現れます。

メッセージにある “500 “はHTTPステータスコードである。調べてみると、曖昧な定義が見つかるだろう:

“500 Internal Server Error “レスポンスコードは、サーバーがリクエストを処理できない予期せぬ状況に遭遇したことを示す。

それはあまり役に立ちませんよね?サーバーが “何かが壊れました、でも何かわかりません “と言っているようなものです。

このエラーの見え方は、ホスティングサービスとウェブブラウザによって異なります。以下はApacheサーバーでの表示例です:

Internal server error page on Apache

あなたのサイトがNginxで動作している場合、少し違って見えるかもしれません。また、Google Chromeが適切なエラーページを読み込めない場合、このような表示になります:

Google Chrome HTTP 500 error

初心者にとって、これは圧倒的に感じるかもしれない。何が悪かったのか、どう修正すればいいのか、メッセージはない。

どこが壊れているのかを告げずに整備士に車の修理を頼むようなものだ。彼らは問題を見つけるまで、さまざまなパーツをチェックする必要がある。

私たちの経験から、問題を解決する最善の方法は、ステップ・バイ・ステップで進めていくことです。最も一般的な原因と解決策を説明しますので、サイトを再びご利用ください。

オンデマンドWordPressサポートでいつでも専門家のヘルプを受けられます!

内部サーバーエラーに対処するのはイライラするものです。オンデマンド WordPress サポートは、技術的な問題を迅速かつ効果的に解決するお手伝いをいたします。

  • 専門家によるオンデマンド・サポートの一括払い
  • 迅速な納期
  • 年中無休

今すぐWordPressの緊急サポートをご利用ください!🛠️

WordPressの内部サーバーエラーの原因は?

WordPressの内部サーバーエラーは、ピースが欠けているパズルのようなものです。何かが間違っているのはわかるが、エラーメッセージは問題の場所を正確に教えてくれない。

私たちの経験では、最も一般的な原因は破損した.htaccessファイルです。また、プラグインやテーマがうまく動作していない場合もあります。

また、サイトがPHPのメモリ制限に達し、WordPressがクラッシュすることもあります。破損したコアファイルもこのエラーを引き起こすことがあり、警告なしにロックアウトされます。

WordPressの管理エリアにアクセスしようとしたときだけエラーが外観表示され、他のサイトは正常に動作しているケースもあります。これは、自分の家から閉め出されたのに、裏口からお客さんが入ってくるようなものです。

このエラーが厄介なのは、WordPressが正しく読み込まれる前に発生することが多いからです。つまり、サーバーは何が問題だったのかを説明するのに十分な詳細を収集することができないのだ。

WordPressが舞台裏でどのように動いているのか、さらに詳しく知りたい方は、WordPressが舞台裏でどのように動いているのかについてのガイドをご覧ください。

では、サイトを復旧させるためのトラブルシューティングの手順を説明しよう。

WordPressの500内部サーバーエラーを修正する

トラブルシューティングを始める前に、WordPressによるサイトの完全なバックアップが手元にあることを確認してください。

WordPressの管理エリアにアクセスできるのであれば、WordPressのバックアッププラグインを使ってサイトの完全なバックアップを作成することができます。

Duplicatorの使用をお勧めします。サイトを素早くバックアップできるだけでなく、バックアップをクラウド上に保存することもでき、最も重要なのはバックアップからサイトを復元できることです。

一方、WordPressの管理エリアにアクセスできない場合は、phpMyAdminとFTPクライアントを使用して手動でWordPressのバックアップを作成することができます。

その後、以下の手順でトラブルシューティングを行い、サイトの内部サーバーエラーを修正することができます。

WordPressとブラウザーキャッシュのクリア

ブラウザーやWordPressのキャッシュプラグインは、エラーページのキャッシュコピーを誤って保存することがあります。

これを解決する最も簡単な方法は、まずブラウザーキャッシュをクリアすることだ。

Clear cache

その後、サイトのWordPress管理エリアにアクセスできる場合は、キャッシュプラグインの設定ページにアクセスしてWordPressのキャッシュを空にすることができます。

詳しくはWordPressのキャッシュをクリアする方法のチュートリアルをご覧ください。

.htaccessファイルが壊れていないかチェックする

.htaccessファイルは、WordPressがリダイレクトを設定するために使用するサーバー設定ファイルです。

内部サーバーエラーの最も一般的な原因の1つは、破損した.htaccessファイルです。

これを修正する最も簡単な方法は、WordPress管理エリアの 設定 ” パーマリンクのページにアクセスし、変更を加えずに「変更を保存」ボタンをクリックすることです。

Update permalinks to regenerate .htaccess file

WordPressは.htaccessファイルの更新または新しいファイルの生成を試みます。これで内部サーバーエラーが解決したかどうか、サイトにアクセスして確認することができます。

それでもエラーが表示される場合は、WordPressが.htaccessファイルを生成または書き込むことができたことを確認する必要があります。

ファイルやディレクトリの権限により、WordPressが.htaccessファイルを作成または書き込むことができない場合があります。

.htaccessファイルを手動で置き換えることができます。まず、FTPまたはホスティングアカウントのコントロールパネルにあるファイルマネージャーアプリを使ってサイトにログインする必要があります。

次に、メインの.htaccessファイルを.htaccess_oldのようにリネームする必要があります。これにより、ファイルをバックアップとして保持することができますが、WordPressはそれを認識しません。

.htaccessファイルの名前を変更するには、FTPまたはホスティングアカウントのcPanelダッシュボードのファイルマネージャーアプリを使用してサイトにログインする必要があります。

接続が完了すると、.htaccessファイルはwp-content、wp-admin、wp-includesのようなフォルダーがあるのと同じディレクトリに置かれます。

.htaccessファイルを右クリックし、.htaccess_oldにリネームするだけです。

Rename .htaccess file

次に、新しい.htaccessファイルを作成する必要があります。

サイトのルートフォルダー内で右クリックし、FTPクライアントまたはファイルマネージャーアプリで「新規ファイルを作成」オプションを選択します。

Create new htaccess file

この新規ファイルを.htaccessと名付け、「OK」をクリックして保存します。

現在、この.htaccessファイルは空になっているので、初期設定のWordPressリライトルールを追加する必要がある。

ファイルを右クリックし、FTPクライアントまたはファイルマネージャーアプリで「表示/編集」を選択するだけです。

Edit .htaccess file

空のファイルは、メモ帳やテキストエディットのようなプレーンテキストエディターで開きます。

次のコードをコピー&ペーストしてください:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

このコードはWordPressが使用する初期設定のルールセットです。変更を保存し、サーバーにファイルをアップロードすることを忘れないでください。

これで内部サーバーエラーが解決したかどうか、サイトにアクセスして確認することができます。

もしそうなら、内部サーバーエラーを修正したのだから、自分を褒めてあげよう。

重要:他のことに移る前に、WordPress管理エリアの設定 ” パーマリンクのページに行き、変更を加えずに保存ボタンをクリックすることを確認してください。これにより、投稿ページが404エラーを返さないように、適切な書き換えルールで.htaccessファイルが再生成されます。

.htaccessファイルの破損をチェックしても解決しなかった場合は、この投稿を読み続ける必要がある。

PHPメモリ制限の増加

スクリプトがPHPのメモリ制限をすべて消費した場合、サーバー内部エラーが発生することがあります。

PHPのメモリ制限を増やす最も簡単な方法は、wp-config.phpファイルを編集することです。初心者の方は注意してください。WordPressのコアファイルの小さなミスでもサイトを壊してしまう可能性があるので、これらの指示に注意深く従いたい。

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

サイトのメインフォルダー内にwp-config.phpファイルがあります。それを右クリックして「ダウンロード」を選択します。これで、何か問題が発生した場合に備えてファイルのバックアップを確実に取ることができます。

それを保存したら、右クリックして『表示/編集』を選択する。

Edit wp-config file

wp-config.phpファイルの中で、「これですべてです!ハッピー公開する:

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

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

注:256Mで問題が解決しない場合は、512Mに増やしてみてください。

WordPressの管理画面にログインしようとしたときや、wp-adminで画像をアップロードしようとしたときにのみ内部サーバーエラーが表示される場合は、以下の手順でメモリ制限を増やす必要があります:

  1. コンピューター上に空白のテキストファイルを作成し、php.iniと命名する。
  2. そこに次のコードを貼り付ける: memory=256MB
  3. ファイルを保存する
  4. FTPで/wp-admin/フォルダーにアップロードします。

メモリ制限を増やすことで問題が解決したのであれば、一時的に問題が解決しただけです。メモリ制限を使い果たした原因を見つける必要があります。

これは、プラグインのコーディング不良か、テーマの機能である可能性があります。正確な診断結果を見つけるために、WordPressのWebホスティングサービス会社にサーバーのログ記録を調べてもらうことを強くお勧めします。

PHPのメモリ制限を増やしても問題が解決しない場合は、さらにトラブルシューティングが必要です。

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

上記の解決策がどれもうまくいかなかった場合、このエラーはサイトにインストールされている特定のプラグインが原因である可能性が高いです。

プラグイン同士の相性が悪い可能性もある。

サイトのWordPress管理エリアにアクセスできるのであれば、プラグインページに行き、WordPressのプラグインをすべて無効化すればよい。

Deactivate all plugins

しかし、WordPressの管理エリアにアクセスできない場合は、FTPを使用してWordPressのプラグインをすべて無効化することができます。

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

接続したら、/wp-content/フォルダに移動し、プラグインフォルダの名前をplugins.deactivatedに変更します。

Plugins deactivated via FTP

WordPressはpluginsフォルダーでプラグインを探します。pluginsフォルダが見つからない場合、すべてのプラグインが自動的に無効化されます。

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

プラグインをすべて復元するには、「plugins.deactivated」フォルダーをpluginsにリネームするだけです。

プラグインは復元されますが、無効化されたままです。

プラグインを個別に有効化し、サイトを訪問して内部サーバーエラーの原因となっているプラグインを特定することができます。

詳しくは、wp-adminを使わずにWordPressのプラグインをすべて無効化する方法をご覧ください。

プラグインをすべて無効化してもサイトの内部サーバーエラーが直らなかった場合は、このまま読み進めてください。

WordPressの初期設定テーマに切り替える

内部サーバーエラーの原因として、WordPressテーマ内のコードが考えられます。

そうであるかどうかを判断するには、WordPressのテーマを初期設定に切り替える必要があります。

WordPressの管理エリアにアクセスできる場合は、外観 ” テーマページにアクセスします。デフォルトテーマがすでにインストールされている場合は、有効化ボタンをクリックするだけでテーマを切り替えることができます。

Activate a default theme

デフォルトテーマがインストールされていない場合は、上部の「新規追加」ボタンをクリックし、デフォルトテーマ(Twenty Twenty-Three、Twenty Twenty-Twoなど)をインストールすることができます。

WordPressの管理エリアにアクセスできない場合でも、デフォルトテーマに切り替えることができる。

FTPクライアントを使用してWordPressサイトに接続し、/wp-content/フォルダに移動するだけです。

右クリックしてテーマフォルダーを選択し、バックアップとしてコンピューターにダウンロードします。

Download theme folder

次に、サイトからテーマフォルダーを削除する必要があります。削除したら、新しいテーマフォルダーを作成してください。

新しいテーマフォルダーは完全に空になります。つまり、現在WordPressテーマがインストールされていないことを意味します。

次に、WordPressテーマディレクトリにアクセスし、初期設定のWordPressテーマをコンピューターにダウンロードする必要がある。

Download a default theme

ブラウザーがテーマをzipファイルとしてコンピューターにダウンロードします。

コンピューター上でファイルを探し、解凍します。Windowsユーザーは、ファイルを右クリックし、「すべて展開」を選択して解凍できます。Macユーザーは、zipファイルをダブルクリックして解凍できます。

Extract theme files

WordPressテーマを含むフォルダーが表示されます。

FTPクライアントまたはファイルマネージャに戻り、このフォルダーを空のテーマフォルダーにアップロードします。

Upload theme folder

アップロードすると、WordPressは自動的に初期設定のテーマを使い始めます。

これで内部サーバーエラーを解決したかどうか、サイトにアクセスして確認することができます。

それでもうまくいかない場合は、WordPressのテーマをバックアップから再アップロードするか、以前使用していたテーマに戻してください。

ご心配なく。エラーを修正するためにできることはまだいくつかあります。

コアファイルの再アップロード

プラグインとテーマのオプションで内部サーバーエラーが修正されなかった場合は、新しいWordPressインストールから/wp-admin/と/wp-includes/フォルダを再アップロードする価値があります。

これはあなたの情報を削除するものではありませんが、ファイルが破損している場合に問題を解決する可能性があります。

まず、WordPress.orgのサイトにアクセスし、「ダウンロード」ボタンをクリックします。

Download media library

WordPressのzipファイルがコンピューターにダウンロードされます。

zipファイルを解凍してください。その中にWordPressフォルダーがあります。

WordPress folder extracted

次に、FTPクライアントを使用してWordPressサイトに接続する必要があります。

接続したら、サイトのルート・フォルダーに移動します。wp-admin、wp-includes、wp-contentフォルダーがあるフォルダーです。

左の列で、コンピューター上のWordPressフォルダーを開きます。

WordPressフォルダー内のすべてのファイルを選択し、サイトにアップロードする必要があります。

Upload core WordPress files

FTPクライアントがこれらのフォルダーをサーバーに転送します。

ファイルを上書きするかどうか尋ねられます。上書きする」を選択し、「常にこのアクションを使用する」を選択し、「現在のキューにのみ適用する」のチェックボックスにチェックを入れます。

Overwrite WordPress core files

FTPクライアントは、古いWordPressファイルを新しい新鮮なコピーに置き換えます。

WordPressファイルが破損している場合は、この手順で内部サーバーエラーを修正できます。

WordPressでデバッグログを有効化する

WordPressには、デバッグ用のログ記録を残すシステムがビルトインされています。

WP Debuggingプラグインを使用することでオンにすることができます。詳しくはWordPressプラグインのインストール方法をご覧ください。

プラグインを有効化すると、WordPressサイトのデバッグログ記録が有効になります。

WordPressサイトの管理エリアにアクセスできない場合は、wp-config.phpファイルに以下のコードを追加することで、デバッグをオンにすることができます:

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

デバッグログを有効にすると、FTPクライアントを使用して/wp-content/フォルダに移動することで表示できます。

Debug log

デバッグログファイルをテキストエディターで開くと、サイトで発生したエラーや警告のリストが表示されます。

エラーや警告の中には、修正する必要のない無害なものもあります。しかし、もしあなたのサイトで内部サーバーエラーが表示されているのであれば、これらは正しい方向を示してくれるかもしれません。

ホスティングサービスに問い合わせる

すべての方法でサイトの内部サーバーエラーを修正できない場合は、さらに助けを求める必要があります。

Webホスティングサポートチームに連絡すれば、サーバーのログ記録をチェックして、エラーの根本原因を突き止めることができます。

自分でトラブルシューティングを続けたい場合は、初心者のための究極のWordPressトラブルシューティングガイドをご覧ください。

動画チュートリアル

Subscribe to WPBeginner

この投稿が WordPress の内部サーバーエラーの解決に役立てば幸いです。また、WordPress の最も一般的なエラーの完全なリストと、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.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us. Here's our editorial process.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!

Reader Interactions

676件のコメントLeave a Reply

  1. I am facing the same issue. Internal Server Error (HTTP 500 Internal Server Error) in my site. I tried following the steps, but i think i am missing something. I am not very good with servers and such. Please help…

    • If none of the recommendations from our guide are able to help you solve the error, please reach out to your hosting provider and they should be able to assist!

      Admin

    • Renaming the htaccess file first helps me when looking for a problem. This will rule out a problem in this file. Then I try to rename the folder with plugins. If none of this helps, try asking the web provider. Usually, it can also be a specific php or server setting.

  2. As for the 500 error, in practice it has proven to be the fastest method to contact my provider and ask him for a printout of the error log. Very often, a problem appears there, which may be due to an unauthorized directive in the .htaccess file, or in the rights on the WordPress folder. with Error 500, it is probably best to really look at the logs right from the start. It can solve many problems very quickly.

  3. Encountering the 500 Internal Server Error in WordPress has been a recurring challenge for me on client websites. I’ve found that the causes are often multifaceted, influenced by various factors such as the hosting provider and the specific WordPress environment, including the plugins and themes in use. Your article shed light on this complexity, and I appreciate it.

  4. Thanks for sharing.

    Sometimes I actually do the permalink-saving thing. But I never knew the details about it.

    Now it’s very clear to me.

  5. OMG you are a lifesaver!!! Simply uploading and replacing the WP admin and include file worked like magic!! THANK YOU !!!

  6. The main cause of this problem is because of the Plugins updation. I faced that problem and can’t even access the Dashboard. So what I did for that is to log in to my hosting and update all my plugins which will help me in getting rid of that problem.

    • Thank you for sharing what worked for you! It is not always the plugins but that can certainly be one of the causes.

      Admin

  7. I was looking for a fix and neither reallt worked for me to fic 500 errors for the pages of a site in multisite when I recently changed the domain name.

    What fixed it was, changing permalinks to plain. So I guess, re-doing permalinks was the easiest fix.

    • Thanks for sharing what worked for you, with the pretty permalinks not working, you may want to check with your hosting provider that mod_rewrite is enabled for your sites.

      Admin

  8. Thanks for this article. Just want to add an extra tip:
    Also check for additional .htaccess files in other folders like for example the ‘uploads’ folder. This may cause a partial 500 internal server error for images and everything that is in that folder. I experienced this recently and was caused by a rigid setting in a security plugin.

    • Thank you for sharing that tip! After going through all the steps in the post and still getting the error on my images, I found an extra .htaccess file that was causing the problem. I’m so glad I decided to read these comments.

  9. A most excellent tutorial, watched to keep me on the ball so to speak, but
    one issue that you missed, and I recently had, was a corrupted wp-config.php file – that was also causing me 500 errors.

    I urge everyone to copy this particular fie to their own machine for safe keeping, My own hosting provider (though brilliant), couldn’t hep me.

    Simply copying my own backup via FTP to my /public_html folder – saw my own site miraculously appear again.

    Hope it helped.

  10. In my case, I was getting an “HTTP ERROR 500” and an “Internal Server Error”, particularly at my WooCommerce checkout. GoDaddy fixed the issue after looking at the error log and increasing the memory limit by inserting a .user.ini file and then adding “define (‘WP_MEMORY_LIMIT’, ‘2048M’ );” to my wp-config.php file.

  11. I have tried all these methods, the error goes away by re-installing wordpress or refreshing core files but it appears again and again when I try to update any plugin or perform any task in the dashboard.

    Please advice, what could be the possible reason that it is keep happening with me.

    • For that continued issue, please reach out to your hosting provider and they should be able to assist.

      Admin

  12. The issue for me was Wordfence security plugin installs an htaccess file in the wp-content/uploads file. Delete this an the internal error disappears! I hope this will help somebody :)

    • We would recommend reaching out to Elementor’s support if you are having an issue with Elementor.

      Admin

  13. Thank you so much. I
    ‘m an experience web developer but new to WordPress.
    Had a 500 error, found this guide and followed it and my problem was solved.

  14. Hello there!
    Error code 500 appears when I click on the browser. The page never opens up since I updated the theme!
    I cannot even open my website to update it according to your instruction here. What to do in that case? Thanks in advance!

  15. Hi. Thankful.
    for Error 500.
    My problem was after updating the template.
    The problem was solved by updating php version.

  16. Hello. I’m having the same problem on my site and it’s hosted on gcp. I tried installing some plugins before I got this error. Is there a way I can remove the plugin from mysql database or do I need to do it through the htaccess file. This blog is true great as it has helped me with most of my site issues. Hope this works also

      • thank you very much. it worked like magic. the thing now is should I delete the old .htaccess file or rename it back? Thanks once again

        • You can get rid of the old file if that was giving you errors and resaving your permalinks should create a new file for you.

  17. You save me every time! Renaming the .htaccess file and saving the page permalinks worked for me, the problem occurred after I updated all my plugins and cleared my cache. Thanks a lot!

  18. Hi,
    I followed your guidance and need to undo the .htaccess change. Should I delete the new .htaccess and thereafter rename the old .htaccess_old to its original name .htaccess to do so? Hope you see this note soon and can help. :)

  19. Well, this is nice information! Thanks for sharing this as it would help many users to know about important information about WordPress. Knowing about this, we are looking forward to implementing things accordingly.

  20. Similar issue my website disappeared while undergoing a major update from a commerce platform plugin. Coming from no experience with these things, this solution was easy to follow even from a different file manager.

    Thank you.

  21. Your blog was very helpful. I had to upload the core files and the steps given by you made it very easy for me. Thank you.

  22. In my case, the problem was that my PHP version was automatically updated by my host and my old WordPress version was incompatible with it. They themselves found the problem and fixed it after my contact through e-mail.

    • Thanks for sharing the issue you ran into and how it was fixed for others running into this problem :)

      Admin

    • If you reached out to your hosting provider they should be able to give you a better idea of the source of the issue.

      Admin

  23. Thank you very much, one of the WP plugin was causing the error, i deactivated it made new installation of that specific plugin and it worked.

    Thanks

  24. wp-includes/post.php File are missing my site and admin panel are not opening

    Error Message :- The site is experiencing technical difficulties

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.