Presuming that you are not an expert on matrimonial law in whatever country your wife was married, the easiest solution is to get a lawyer in the country in which she was married
It is possible to get a divorce in Thailand even if married abroad, but usually that is done where there is consent of the parties involved. Whether you can register the marriage here unilaterally and then apply for a divorce from the Thai courts (which most countries would accept as a valid divorce) is something that a Thai lawyer familiar with family law should be able to advise you on.
Bear in mind that some countries have archaic marriage laws so don't permit divorce without consent of both parties, or have rules such as 5 year separation without consent (i.e. you would have to wait another 2 years to divorce unilaterally) etc. Without knowing which country is involved or the type of marriage involved (different countries have different customs for wedding ceremonies, and not all are valid for these purposes), it is impossible to even do basic research on what is required.
The poster suggesting you get married in Thailand regardless isn't completely wrong. You can get what is referred to a temple wedding where you basically get a public blessing as a couple which gives some legitimacy to the relationship and a public ceremony to which she can invite her (and your) family etc. but don't register the marriage at the Amphur as this could cause problems for one or both of you down the line as of course registering the 'legal' marriage would be technically a criminal offence as being bigamous and would be legally void if it ever came to it.