MySQL で WordPress のサイトURL等を抽出する
2022/01/13
Docker 上のコンテナで試験。
# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 50
Server version: 8.0.27 MySQL Community Server - GPL
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use wp_test;
Database changed
mysql> select option_id,option_name,option_value from wp_options where option_value like "%lvh.me%";
+-----------+-------------+---------------------+
| option_id | option_name | option_value |
+-----------+-------------+---------------------+
| 1 | siteurl | https://lvh.me:4043 |
| 2 | home | https://lvh.me:4043 |
+-----------+-------------+---------------------+
2 rows in set (0.00 sec)
mysql>
例えばこんな感じ。