404 for archives after deploy, need to reset Permalinks

After deploy, any custom archives resulted in 404 and I had to manually had to update permalinks.

I ended up adding this to trellis/roles/deploy/tasks/finalize_after.yml

- name: Update WP permalinks
  command: wp rewrite flush
    chdir: "{{ deploy_helper.new_release_path }}"
1 Like

I was having the same problem. I was also losing my widget placements after a deploy.

I believe both problems are due to:

If you’re going to use this fix, also be sure to use the fix for this fix!:

Deployments working as expected now.