LoginSignup
1
0

More than 3 years have passed since last update.

Amazon Web Services 基礎からのネットワーク&サーバー構築 8-4(173p) http error 500 解決メモ

Last updated at Posted at 2021-05-02

「Amazon Web Services 基礎からのネットワーク&サーバー構築」の8-4(173ページ)でWordPressの初期設定画面が出るはずのところが「http error 500」が出てしまい、ちょっちハマってしまったので解決メモを残しておきます。


$ cd ~
$ cd wordpress

でwordpressディレクトリに移動して、

$ sudo amazon-linux-extras install php7.3

このコマンドを実行します(このコマンドはPHPをアップデートするもの)。
これで動くようになりました。


何が原因だったのか、結論から言うとPHPのバージョンが足りていませんでした。
WordPressの最新版は、PHPバージョン5.6.20以降でしか動きません。
しかし、wordpressディレクトリで、

$ yum list installed | grep php

こちらのコマンドを実行してインストールされているPHPのバージョンを確認してみると、僕の環境ではPHP5.4とバージョンが足りていなかったためwordpressが正常に動作しなかったというわけです。

その他、使ったコマンド

PHPのエラーを確認するコマンド

  • sudo less /var/log/httpd/error_log | tail -20
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0