2018年5月8日火曜日

wordpressトラブル対応(IP変更編)

wordpress用サーバのIPを変更したら、wordpressの画面に移行できなくなった。。。
対策方法を記載してみる。


1)MySQLに接続後に、対象のwordpress用のDBを確認する。
(DB名を忘れていたので。という意味で。。)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| digihide           |
| information_schema |
| mysql              |
| performance_schema |
| wordpress          |
+--------------------+
5 rows in set (0.00 sec)


2)wordpressで使用中のDBを選択する。

MariaDB [wordpress]> use digihide
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A


3)以下のコマンドを入力することで、変更前のIPが残っているので
修正する必要がある。

Database changed
MariaDB [digihide]> SELECT * FROM wp_options WHERE option_name IN ('home','siteurl');
+-----------+-------------+-----------------------+----------+
| option_id | option_name | option_value          | autoload |
+-----------+-------------+-----------------------+----------+
|         2 | home        | http://192.168.10.112 | yes      |
|         1 | siteurl     | http://192.168.10.112 | yes      |
+-----------+-------------+-----------------------+----------+
2 rows in set (0.00 sec)



4)変更した新IP"192.168.1.112"を以下に入力して修正を行う。

UPDATE wp_options SET option_value='192.168.1.112' where option_name = 'siteurl';
UPDATE wp_options SET option_value='192.168.1.112' where option_name = 'home';


5)再度、ブラウザからログインを行なったら接続できた。。
ということで解決!


0 件のコメント:

コメントを投稿

EFS(Dockerfile)の記載について注意

  Dockerfileにefsのマウントパス宛に、ファイルコピーを行うと ECSのサービス作成時に、コンテナのデプロイ失敗に(container run time error)になるので 別経由で、EFSにファイルをコピーした方が良い!! <Dockerfile> ...