Rejecting a PhD offer after having accepted it. Advice? I have accepted a PhD offer from a very good university to do a project very close to my interests. I have told the project supervisor I accept it. In the meanwhile I have managed to secure a PhD offer from another 2 universities much better in world rankings and with better research groups and better faculty. Additionally these 2 universities do research exactly on what I want to devote my PhD research.

My only commitment to the first university is a mail confirming I accept. Nothing else. I understand declining the offer after already having accepted it is quite dishonest but it is a huge decision that will affect my future in a very significant level. 

I would like your opinion and I would also like to ask for possible consequences of such an action. As far a postdocs concerned, in the first university there is no chance I ever get a postdoc since they do not actually do research on my area (except for the prospective supervisor and even he not as much).

UPDATE
I have decided to do as I was afraid to. I have decided to choose a different university than the first one that I have already accepted the offer. My offer acceptance included: 


An online "I accept" statement.
An e-mail I sent stating "I accept the scholarship and this University is my first option"


I do not have any legal commitments since I have not signed anything. The supervisor of the first university though is really nice to me and continuously was sending me mails. How do I very nicely tell her I will not be joining in the end? Additionally the place I will go in the end will be for research in Mathematics and not Physics. Can I use this as a part of a sensical excuse?

WHAT I HAVE CHOSEN AND WHAT THE CONSEQUENCES WERE

I think that I should let people, especially other beginning grad students know what happened with my case. I have chosen to nicely tell the first university I got accepted that I will not be attending and will not be pursuing a PhD there since I decided I have different research interests (which is true). I had applied there in the first place since I was not sure what I wanted to do and because it was a nice program. Despite that, I got an offer from a World top university to work on 100% my research interests. I explained this to them, the first uni, and they happily let me go and wished me good luck, especially the supervisor who faught a lot secure me funding. I was lucky.
I am assuming you are going to go to the better place, so asking our opinion is rhetorical.  

The consequences depend on the people at the university:  if they are reasonable folks, they should understand.  But you never know.

You should do your best to make it as painless as possible FOR THEM.  My suggestion is that you should decide where you want to go, and accept there. And the AS SOON AS POSSIBLE, send a very very nice and very very apologetic letter to the person you had said yes to, explaining that you have decided to go elsewhere.  The key here is "as soon as possible" so they have the opportunity to offer acceptance to someone else -- that will lesson any annoyance they have.