N8n versioning is not maintaining

Describe the problem/error/question

I published a new version of my workflow on n8n. However, when I check the executions of my flow after publishing, it is still executing the old version of my flow.

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 2.31.5
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Yes, Via Docker
  • Operating system: Linux

Hey @Abhinav_Jotiram_Shin, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@tamy.santos, @Niffzy - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

Hey @Abhinav_Jotiram_Shin

Does any of these apply?

Based on the info you have given, I am assuming you are using queue mode.

If you self-host n8n with EXECUTIONS_MODE=queue, restart the main n8n instance and worker processes to clear in-memory cached workflow states:

# Docker Compose restart for n8n main and workers
docker compose restart n8n n8n-worker

What you encountered is likely due to this:
Jobs already enqueued in Redis before you hit “Publish” will finish executing using the version payload present when the trigger fired.

In n8n, saving a workflow does not automatically update the active production version; you must explicitly Publish it.

If you have already clicked “Publish” and it is still running the old version, the most common cause is a caching/deployment lag in Queue Mode or a failure to activate the workflow toggle​.

Hi @Abhinav_Jotiram_Shin Welcome!
Export what n8n actually has stored as the published version and compare it against your editor, that settles whether the publish landed at all:

docker exec -u node -it <your-n8n-container-name> n8n export:workflow --id=<WORKFLOW_ID> --published --output=/tmp/published.json

If that file is the old flow, the published pointer never moved off the old version. Publish the current draft by ID:

docker exec -u node -it <your-n8n-container-name> n8n publish:workflow --id=<WORKFLOW_ID>

Both commands act on the database directly, so the change applies on the next n8n start.