by Rama Bodapati.
Thank you Rohit for the suggestion. I was trying to connect my WP site to Moodle and faced this issue.
I used the brute force technique of cleaning up all my plugins which were not being used and especially those which showed some warnings like missing files.
After this cleanup this issue got resolved. I am not sure which plugin was causing the issue but could be from a theme.
Thanks Again.
Regards
Rama