Fixing wordpress CORS error after changing the URL
I recently changed Agile Reaction URL slightly, I added www. I added it to make my workflow for adding projects easier in the future. Anyhow after doing this, there were some minor issues with WordPress like icons and such not showing properly. The errors I was getting were No “Access-Control-Allow-Origin” header. My browser considered agilereaction.com and www.agilereaction.com as two different sites and blocked any resources coming from the other. This article is much more in-depth on the migration problems and solutions.
Anyhow, I found using All-in-One WP Migration easily solved the issue. Install that plugin and backup first. Add the original domain in the first field “//agilereaction.com”. The new domain in the second field “//www.agilereaction.com” (replace agilereaction.com with your domain). Export to a file. This finds all instances of https://agilereaction.com and replaces it with https://www.agilereaction.com.
Import the file and replace your database. That should solve the issue.
I had a bit of trouble finding information on how to solve this issue. I figured I would make a short post in case someone else ran into the same issue.