My webstie is built-in wordpress.
Origin is not allowed by Access-Control-Allow-Origin error is showing on my console. So resolve this bug i used header('Access-Control-Allow-Origin: *') in top of my php code.
After apply changes, my website shows Forbidden error and my home page shows Internal Server Error.

Can this error occurs after include header() or may be other issue is there?

I am new in wordpress. So please guide me about this bug.

Thank you in advance. I really appreciate for your help.

Read more here: is it safe to use header(‘Access-Control-Allow-Origin: *’) for wordpress website


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: