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

Leave a Reply

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

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>


The reCAPTCHA verification period has expired. Please reload the page.