@t-p Thank you for the response. I did all the steps mentioned in wpbeginner website but it was not working for me.
My issue is resolved.
I mailed my hosting provider about the issue and they said there were some blocking rules that got triggered which can only be removed by their end. They removed the blockings and issue is resolved.
Other Users Try this also. All the best.