{"id":37051,"date":"2024-12-17T20:27:15","date_gmt":"2024-12-17T20:27:15","guid":{"rendered":"https:\/\/www.wpstaq.com\/?post_type=knowledgebase&#038;p=37051"},"modified":"2026-05-02T04:55:36","modified_gmt":"2026-05-02T04:55:36","slug":"fixing-cors-errors","status":"publish","type":"knowledgebase","link":"https:\/\/www.wpstaq.com\/sg\/knowledgebase\/fixing-cors-errors\/","title":{"rendered":"Fixing CORS Errors"},"content":{"rendered":"<p>CORS (<strong>Cross-Origin Resource Sharing<\/strong>) errors occur when resources (fonts, scripts, images) load from a domain or subdomain different from your primary domain. These errors often happen:<\/p>\n<ul>\n<li>After migrating a website.<\/li>\n<li>If the URLs (e.g., <strong>www<\/strong> vs. non-www) do not match the primary domain.<\/li>\n<li>If resources load over HTTP instead of HTTPS.<\/li>\n<\/ul>\n<p>This guide explains how to resolve CORS errors using <strong>Staq tools<\/strong>.<\/p>\n<hr \/>\n<h2><strong>Common Causes of CORS Errors<\/strong><\/h2>\n<ol>\n<li><strong>Primary Domain Mismatch<\/strong>:\n<ul>\n<li>Example: Resources load from <code>https:\/\/example.com<\/code> instead of <code>https:\/\/www.example.com<\/code>.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Outdated Resource Links<\/strong>:\n<ul>\n<li>Example: HTTP links instead of HTTPS.<\/li>\n<\/ul>\n<\/li>\n<li><strong>Cached Files<\/strong>:\n<ul>\n<li>Theme, plugin, or server-side caches retain incorrect URLs.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<hr \/>\n<h2><strong>Step-by-Step Solutions<\/strong><\/h2>\n<h4>1. <strong>Verify and Update Resource URLs Using Search &amp; Replace<\/strong><\/h4>\n<p>To perform a <strong>Search &amp; Replace<\/strong> in the database, you have two options:<\/p>\n<ul>\n<li>inside the Staq Panel for the particular site; OR<\/li>\n<li>inside the backend of WordPress via the Staq Hosting plugin.<\/li>\n<\/ul>\n<p>Follow this guide to do a <a href=\"https:\/\/www.wpstaq.com\/knowledgebase\/how-to-do-a-search-replace\/\" target=\"_blank\" rel=\"noopener\">database search and replace<\/a>.<\/p>\n<h3>2. <strong>Clear Staq Cache and Redis Object Cache<\/strong><\/h3>\n<p><strong>Clear Staq Cache<\/strong>:<\/p>\n<ul>\n<li>In WordPress backend \u2192 Hover over <strong>Staq Hosting<\/strong> \u2192 Click <strong>Clear Site Cache<\/strong>.<\/li>\n<li>OR in the <strong>Staq Panel<\/strong> \u2192 Under <strong>Files<\/strong>, click <strong>Cache<\/strong> \u2192 Click <strong>Clear Cache<\/strong>.<\/li>\n<\/ul>\n<p><strong>Flush Redis Object Cache<\/strong>:<\/p>\n<ol>\n<li>Go to the site&#8217;s <strong>Staq Panel<\/strong> \u2192 Under <strong>Database<\/strong>, click <strong>Redis Object Cache<\/strong> \u2192 Click <strong>Flush<\/strong>.<\/li>\n<li>OR in WordPress backend \u2192 Go to <strong>Staq Hosting<\/strong> \u2192 <strong>Object Cache<\/strong> \u2192 Click <strong>Flush Cache<\/strong>.<\/li>\n<\/ol>\n<hr \/>\n<h3>3. <strong>Reset Theme and Plugin Caches<\/strong><\/h3>\n<p>Certain themes store cached URLs. Reset caches as follows:<\/p>\n<table>\n<thead>\n<tr>\n<th>Theme\/Page Builder<\/th>\n<th>Cache Clearing Instructions<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><strong>Avada<\/strong><\/td>\n<td>Go to <strong>Avada<\/strong> \u2192 <strong>Options<\/strong> \u2192 <strong>Performance<\/strong> \u2192 <strong>Reset Avada Caches<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Divi<\/strong><\/td>\n<td>Go to <strong>Divi<\/strong> \u2192 <strong>Theme Options<\/strong> \u2192 <strong>Builder<\/strong> \u2192 <strong>Clear Static CSS File Generation<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Elementor<\/strong><\/td>\n<td>Go to <strong>Elementor<\/strong> \u2192 <strong>Tools<\/strong> \u2192 <strong>Regenerate CSS<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Beaver Builder<\/strong><\/td>\n<td>Go to <strong>Settings<\/strong> \u2192 <strong>Beaver Builder<\/strong> \u2192 <strong>Cache<\/strong> \u2192 <strong>Clear Cache<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td><strong>Bricks Builder<\/strong><\/td>\n<td>Go to <strong>Bricks<\/strong> \u2192 <strong>Settings<\/strong> \u2192 <strong>System<\/strong> \u2192 <strong>Clear Cache<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr \/>\n<h3>4. <strong>Verify CORS in Browser Developer Tools<\/strong><\/h3>\n<ol>\n<li>Open <strong>Developer Tools<\/strong> in your browser (right-click \u2192 Inspect \u2192 <strong>Console<\/strong>).<\/li>\n<li>Check for CORS errors (e.g., font or script file blocked).<\/li>\n<\/ol>\n<p>If the issue persists, ensure all URLs are consistent and <strong>contact Staq Support<\/strong> for server-side fixes.<\/p>\n","protected":false},"featured_media":0,"parent":0,"template":"","class_list":["post-37051","knowledgebase","type-knowledgebase","status-publish","hentry","categories-server-errors"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fixing CORS Errors - Managed Hosting Platform for WordPress<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fixing CORS Errors - Managed Hosting Platform for WordPress\" \/>\n<meta property=\"og:description\" content=\"CORS (Cross-Origin Resource Sharing) errors occur when resources (fonts, scripts, images) load from a domain or subdomain different from your primary domain. These errors often happen: After migrating a website. If the URLs (e.g., www vs. non-www) do not match the primary domain. If resources load over HTTP instead of HTTPS. This guide explains how&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/\" \/>\n<meta property=\"og:site_name\" content=\"Managed Hosting Platform for WordPress\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/staqhosting\/\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-02T04:55:36+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/fixing-cors-errors\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/fixing-cors-errors\\\/\",\"name\":\"Fixing CORS Errors - Managed Hosting Platform for WordPress\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\"},\"datePublished\":\"2024-12-17T20:27:15+00:00\",\"dateModified\":\"2026-05-02T04:55:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/fixing-cors-errors\\\/#breadcrumb\"},\"inLanguage\":\"en-sg\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/fixing-cors-errors\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/knowledgebase\\\/fixing-cors-errors\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.wpstaq.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fixing CORS Errors\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#website\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"name\":\"Managed Hosting Platform for WordPress\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.wpstaq.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-sg\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#organization\",\"name\":\"Staq\",\"alternateName\":\"WPStaq\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-sg\",\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-LogoNoText.png\",\"contentUrl\":\"https:\\\/\\\/www.wpstaq.com\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/cropped-LogoNoText.png\",\"width\":512,\"height\":512,\"caption\":\"Staq\"},\"image\":{\"@id\":\"https:\\\/\\\/www.wpstaq.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/staqhosting\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/wpstaq\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fixing CORS Errors - Managed Hosting Platform for WordPress","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/","og_locale":"en_US","og_type":"article","og_title":"Fixing CORS Errors - Managed Hosting Platform for WordPress","og_description":"CORS (Cross-Origin Resource Sharing) errors occur when resources (fonts, scripts, images) load from a domain or subdomain different from your primary domain. These errors often happen: After migrating a website. If the URLs (e.g., www vs. non-www) do not match the primary domain. If resources load over HTTP instead of HTTPS. This guide explains how&hellip;","og_url":"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/","og_site_name":"Managed Hosting Platform for WordPress","article_publisher":"https:\/\/www.facebook.com\/staqhosting\/","article_modified_time":"2026-05-02T04:55:36+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/","url":"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/","name":"Fixing CORS Errors - Managed Hosting Platform for WordPress","isPartOf":{"@id":"https:\/\/www.wpstaq.com\/#website"},"datePublished":"2024-12-17T20:27:15+00:00","dateModified":"2026-05-02T04:55:36+00:00","breadcrumb":{"@id":"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/#breadcrumb"},"inLanguage":"en-sg","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wpstaq.com\/knowledgebase\/fixing-cors-errors\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.wpstaq.com\/"},{"@type":"ListItem","position":2,"name":"Fixing CORS Errors"}]},{"@type":"WebSite","@id":"https:\/\/www.wpstaq.com\/#website","url":"https:\/\/www.wpstaq.com\/","name":"Managed Hosting Platform for WordPress","description":"","publisher":{"@id":"https:\/\/www.wpstaq.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wpstaq.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-sg"},{"@type":"Organization","@id":"https:\/\/www.wpstaq.com\/#organization","name":"Staq","alternateName":"WPStaq","url":"https:\/\/www.wpstaq.com\/","logo":{"@type":"ImageObject","inLanguage":"en-sg","@id":"https:\/\/www.wpstaq.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/cropped-LogoNoText.png","contentUrl":"https:\/\/www.wpstaq.com\/wp-content\/uploads\/2023\/05\/cropped-LogoNoText.png","width":512,"height":512,"caption":"Staq"},"image":{"@id":"https:\/\/www.wpstaq.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/staqhosting\/","https:\/\/www.linkedin.com\/company\/wpstaq"]}]}},"_links":{"self":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/knowledgebase\/37051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/knowledgebase"}],"about":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/types\/knowledgebase"}],"wp:attachment":[{"href":"https:\/\/www.wpstaq.com\/sg\/wp-json\/wp\/v2\/media?parent=37051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}