LoginSignup
6
4

More than 5 years have passed since last update.

WordPressで固有IPを変更してしまってサイトが開けなくなった時の対処法

Posted at

WordPressでIPを変更してしまってサイトが開けなくなった時の対処法

まずはMySQLにログインしてください。(AWSのEC2からRDSをにログインする場合)

sudo mysql -P ポート番号 -h エンドポイント -u ユーザ名 -p

パスワードを聞かれるので入力してください。
次に現在のIPの確認

mysql> select * from wp_options where option_name = 'siteurl';

mysql> select * from wp_options where option_name = 'home';

スクリーンショット 2016-07-01 18.41.33.png
スクリーンショット 2016-07-01 18.41.47.png

画像のようにIPが現在のIPと違ったら変更します。

---を自分の変更したIPにしてください。

mysql> update wp_options set option_value = 'http://ec2-***-***-***-***.ap-northeast-1.compute.amazonaws.com/wordpress' where option_name = 'siteurl';

mysql> update wp_options set option_value = 'http://ec2-***-***-***-***.ap-northeast-1.compute.amazonaws.com/wordpress' where option_name = 'home';

この変更が終わったら、自分のサイトが開けるようになってると思います。

参考にしたサイトです
http://promamo.com/?p=3026

6
4
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
6
4