diff --git a/docker_test.sh b/docker_test.sh
index baf0526b506139b3b5cf598137b59d52a35e6cb9..f37c4f2cc7dc5d361a6670e7f094b42624b016d7 100755
--- a/docker_test.sh
+++ b/docker_test.sh
@@ -48,6 +48,12 @@ else
   exit 0
 fi
 
+echo -e "\n==== Replace production URL with testing URL in all files ===="
+for f in $(grep -l -r ".picasoft.net" .); do
+  echo -e "\tFound in" ${f}
+  sed -i "s/.picasoft.net/.test.picasoft.net/g" ${f}
+done
+
 echo -e "\n==== Remove and re-create named external volumes ===="
 for v in $(docker-compose config --volumes); do
   # Don't fail if volume does not exists
@@ -60,12 +66,6 @@ echo -e "\n==== Pull new versions of images ===="
 docker-compose config | grep "image:" | cut -d ':' -f 2- | xargs docker image rm || true
 docker-compose pull
 
-echo -e "\n==== Replace production URL with testing URL in all files ===="
-for f in $(grep -l -r ".picasoft.net" .); do
-  echo -e "\tFound in" ${f}
-  sed -i "s/.picasoft.net/.test.picasoft.net/g" ${f}
-done
-
 echo -e "\n==== Lauch $1 and restore repository ===="
 docker-compose up -d
 git reset --hard