Category: mariadb

TODO: Change wordpress TCP port

Change wordpress TCP port

After change port in settings, also redeployed dockers, the website is unreachable.

Change port

Update in setting of wordpress

Update docker-compose.yml file

Destory and recreate dockers

docker-compose down
docker-compose up -d

Note: Failed

Change back port

Change port back using by update option values database.

Access mariadb docker

docker exec -it wp_db_1 bash

Login to mariadb

mysql -u wordpress -p

Search option value

MariaDB [wordpress]> select * from wp_options where option_value like '%192.168.1.14%';
+-----------+-------------+------------------------+----------+
| option_id | option_name | option_value           | autoload |
+-----------+-------------+------------------------+----------+
|         1 | siteurl     | http://192.168.1.14:80 | yes      |
|         2 | home        | http://192.168.1.14:80 | yes      |
+-----------+-------------+------------------------+----------+
2 rows in set (0.058 sec)

Update value back

MariaDB [wordpress]> update wp_options set option_value='http://192.168.1.14:8080' where option_value='http://192.168.1.14:80';
Query OK, 2 rows affected (0.008 sec)
Rows matched: 2  Changed: 2  Warnings: 0

MariaDB [wordpress]> select * from wp_options where option_value like '%192.168.1.14%';
+-----------+-------------+--------------------------+----------+
| option_id | option_name | option_value             | autoload |
+-----------+-------------+--------------------------+----------+
|         1 | siteurl     | http://192.168.1.14:8080 | yes      |
|         2 | home        | http://192.168.1.14:8080 | yes      |
+-----------+-------------+--------------------------+----------+
2 rows in set (0.058 sec)

MariaDB [wordpress]> quit