An undersea earthquake measuring 7 magnitude struck off Mexico's southwest Pacific coast on Wednesday, said the Pacific Tsunami Warning Center.