Depends on your DC. My eldest, DS1 moved primary to do the last half term in Y5 and all of Y6 in a feeder primary to our desired secondary (planned house move). There was no place for DS2 at that stage so I drove him 3 miles to his old junior school. He got a place at the beginning of Y4 at the new primary, ie in the September.
DS1 has always been a bit shy and reticent about friends. The Y6 thing was good but he didn't really make any friends as such. I wasn't kicking myself for a couple of reasons: The catchment Secondary of the old school would have been low on my list of choices; His gang from the junior consisted of a girl, whom I knew he'd drift away from (and who is now at another secondary altogether!) and the other 2 boys are basically heading on a different life-trajectory to DS1 so they would have parted company by the end of Y7 anyway.
DS2- well, by and large he could have been at this primary since YR. OK, there are some largely mummy- engineered friendships DS2 can't crack as well as he might were the playing field level, but he has a new gang (and, luckily, still sees the old gang at Cubs every week!) and is perfectly happy.
The other thing is once they hit secondary, that mum-at-the-school-gate thing just doesn't happen any more. You can't encourage friendships along like you could in primary, it's up to the DC. So it's a bit easier if you actually know a couple of other mums before they go to secondary.
So my advice is: IF you're going to do it, do it sooner rather than later.