I there, I’m using a custom script to deploy my bedrock site from Gitlab CI/CD workers.
Basically, I’m running composer install on Gitlab, then I rsync web/
, vendor/
and config/
to my server.
When I do that, I rename the current production folder to something else (eg. /var/www/production → /var/www/old) and I rsync the new files in the /var/www/production.
My last step is to copy former updates/
files from /var/www/old into the production folder.
When I do that, everything works except one thing : my permalinks stop working. I always need to reset them (by visiting wp-admin/options-permalink.php
and saving).
Any idea about why it does that? Is there some cache mecanism behind that? How can I fix this behavior during my deploy?