As I mentioned in another thread where this came up recently, here's my take:
"Write what you know" is a prompt for writers who are blocked, or are struggling to find a topic, or are stumped on how to flesh out a scene.
It is a REMINDER to draw on your own knowledge as a source, freeing you up from having to figure out or make up, or research every concept or image.
It is NOT supposed to be a limiter, as in "ONLY write what you know." That would be, I maintain, some of the worst advice you could get as a writer and would stifle the imagination.
As a limiter, I agree that "know what you write" would be the better advice.
"Write what you know" = a prompt to get the creative juices flowing by reminding you that you DO already have stuff in your head to write about.
"Know what you write" = a caution that if you're going to write about what you don't know, do the research, put in the effort and make it sound believable.