WordPress + MultiSite + Let’s Encrypt

WordPress のマルチサイトで、HTTP → HTTPS に移行しようとすると、site URL が書き換えられなくてハマる。直接データベースを書き換えろということなので、ちゃちゃっと作業する。

MariaDB [wordpress]> select * from wp_options where option_name like 'siteurl';
+-----------+-------------+------------------------------------+----------+
| option_id | option_name | option_value                       | autoload |
+-----------+-------------+------------------------------------+----------+
|         1 | siteurl     | http://iis.edu.tama.ac.jp/projects | yes      |
+-----------+-------------+------------------------------------+----------+
1 row in set (0.00 sec)

MariaDB [wordpress]> begin;
Query OK, 0 rows affected (0.00 sec)

MariaDB [wordpress]> update wp_options set option_value='https://iis.edu.tama.ac.jp/projects' where option_id=1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0

MariaDB [wordpress]> commit;
Query OK, 0 rows affected (0.10 sec)

Source: WordPressのマルチサイトの親サイトのサイトURLを書き換える方法 | Dr.Clover’s Computer Clinic

This entry was posted in ソフトウェア, 作業メモ. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.