I have migrated a web site using Avada WordPress theme.
Once site is migrated, i edited wp-config.php file and added following to avoid site getting redirected to old website url.
define('WP_HOME','https://www.newurl.com'); define('WP_SITEURL','https://www.newurl.com');
Now site works, but some of the resources are loaded from OLD site url, this breaks some of the icons.
On Browser Developer tool console, it show following errors
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/webfonts/fa-regular-400.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/webfonts/fa-solid-900.woff2. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/icomoon/icomoon.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/webfonts/fa-regular-400.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/fa-solid-900.woff. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://www.oldurl.com/wp-content/themes/Avada/includes/lib/assets/fonts/fontawesome/webfonts/fa-regular-400.ttf. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
Using URL replacement plugins like Better Search Replace or Velvet Blues Update URLs did not fix the problem.
To fix the it, login to wp-admin. Click on “Avada” on left menu, select Theme Options
wp-admin > Avada > Theme Options > Import/Export
Under Export Options, click on “Download Data File”, this will ask you to save theme configuration file as a .json file, for me it saved fusion_options_backup_02-08-2019.json.
Next click on “Import Contents from File” button. It will show a text area, paste content of the json file you downloaded in previous step here and click “Import”. This will fix the problem related to fonts loading from old url.
Leave a Reply