How to change the domain of a container?
chwzr opened this issue · 2 comments
I have a wordpress setup which is made with this repo. lets say with domain example.com
The client want to switch his domain to notexample.com... I Could not figure out how to switch it without loosing data ? Any steps recommended here?
figured it out.
Just delete the wordpress container
docker rm -f wordpress
then change the domain in the .env and docker-compose up -d
now the only thing to change is the site-url in the database, or define it in the wp-config.php.
If you do not have a other method which does this automaticly, please close this issue :)
Hello @chwzr,
In fact you don´t need to delete the container... you could just change the url in the .env file and restart the container... that should do it.
Glad you manage to fix it.