PORTSTEWART, Northern Ireland — Rory McIlroy is taking a break from social media after getting embroiled in a Twitter spat with fellow golfer Steve Elkington.

After McIlroy missed the cut by four shots at the U.S. Open last month, Elkington, a former U.S. PGA champion, tweeted that the Northern Irishman was “bored” of playing golf because he had plenty of money in the bank.

Four-time major winner McIlroy sent a tweet in response to Elkington, before posting a screenshot of his Wikipedia entry which lists some of his achievements in the game.

“I sort of regret sending it at the end,” McIlroy said Wednesday, “but I actually gave my wife, Erica, my phone and my Twitter and told her, ‘Change my password to something else and don’t tell me what it is.’

“So as of the time being, I’m off social media just because of that reason. I don’t need to read it. It’s stuff that shouldn’t get to you and sometimes it does.”

Speaking ahead of the Irish Open at Portstewart Golf Club, an event which benefits his own foundation, McIlroy said he would have ignored the criticism if it had come from a member of the public or media.

“But a former player that has won a major and been successful, that’s sort of why it got to me,” McIlroy said, “and that’s why I sort of retaliated a little bit.”

McIlroy hasn’t won — or seriously contended at — a major since capturing the 2014 U.S. PGA Championship. The British Open takes place at Royal Birkdale from July 20-23, and he played there last week. McIlroy is fit again after an injury-hit 2017 so far.

“I’m close,” said McIlroy, ranked No. 4. “I’ve got two big opportunities coming up this summer. Birkdale is a golf course I feel I can do well at. And then Quail Hollow for the PGA, I’ve won there two times, my first win on the PGA Tour and last time I won by seven.

“I think they are two opportunities for me to get back on the major ladder.”

McIlroy won the Irish Open last year. He plays alongside Jon Rahm and Hideki Matsuyama in the first two rounds.