Skip to content

How to manually rebuild scripts and styles after changes

You saved a color, font, or layout change, and the site still looks the same. Either a cache is serving an old copy of your styles, or Marketers Delight has not rebuilt its stylesheet since the change. This page shows how to tell which, then fixes each cause in order of how often it happens.

Marketers Delight turns your settings into a static style.css file in wp-content/uploads/marketers-delight/ and rebuilds it when you save. How Marketers Delight builds its CSS explains the full process.

Quick Tip: Your website’s CSS and JavaScript files are rebuilt each time you save the MD admin settings. If your site looks broken or seems to use out of date styles, simply re-save your admin as a quick fix.

Before you start

  • You need an Administrator account on a site running Marketers Delight 6.0 or later.
  • Know which caching tools run on your site: a caching plugin, your host’s cache, or a CDN such as Cloudflare.

Find where the old styles come from

The stylesheet link in your page source carries a version number, and that number is the time the file was last written. Comparing it before and after a save tells you whether MD rebuilt the file.

  1. Open your site in a private browser window and view the page source.
  2. Search for marketers-delight/style.css?ver= and note the number after ver=.
  3. In WordPress, go to Theme → Settings and select Save on the Settings tab.
  4. Open a new private window, view the source again, and compare the number.

What the result means:

  • The number changed and the private window shows your change. The file is current. A cache in your normal browser or a minify plugin is the problem.
  • The number did not change. Either a page cache served old HTML, or MD could not write the file. Clear your page cache and check again; if it still does not change, see the last section.
  • The number matches the theme version, such as 6.0.4. The file does not exist. See A change MD has not compiled below.
  • There is no style.css link. Print style.css inline is checked under CSS Manager on the Settings tab, so your styles are printed inside the page’s <head>. Any cache that holds the page also holds the old styles.

Page cache, host cache, or CDN

Symptom: Logged-in views look right, but visitors and private windows see the old design.

Cause: A page cache stores full pages, including the stylesheet link with the old version number. With Print style.css inline or Inline Critical CSS (defer style.css) on, the cached page holds the old CSS itself. A CDN can also keep its own copy of style.css.

Fix: Purge every cache layer, from the site outward:

  1. Your caching plugin’s cache.
  2. Your host’s cache. On SiteGround, select Purge SG Cache in the WordPress toolbar. The Speed Optimizer plugin adds that button.
  3. Your CDN, such as Cloudflare, from its dashboard.

Reload in a private window.

Browser cache

Symptom: A private window shows the change, but your normal browser does not.

Cause: Your browser kept an older copy of the page. MD changes the stylesheet’s version number every time it writes the file, so a fresh page normally fetches the new stylesheet without any help.

Fix: Force a full reload (Shift and Reload in most browsers), or clear the browser’s cached files for your site.

Minify and combine plugins

Symptom: The page source no longer links to marketers-delight/style.css, and the change does not show even in a private window.

Cause: A plugin that minifies or combines CSS serves its own copy of MD’s stylesheet and rebuilds that copy on its own schedule.

Fix: Clear that plugin’s cache or regenerate its files. To confirm the plugin is the cause, turn off its CSS minify and combine options, reload in a private window, and turn them back on once the change shows.

A change MD has not compiled

MD rebuilds its stylesheet when you save any tab under Theme → Settings, update a menu, activate the theme, activate, update or delete a Drop-in, or update the theme from WordPress.

After a theme update or a Drop-in activation, the rebuild runs on the next page load. Changes made any other way wait for the next save.

Symptom: The version number does not change, or matches the theme version, and no cache is involved.

Cause: One of these:

  • You edited your child theme’s style.css with Combine child theme CSS into style.css on. Your child theme CSS is copied into MD’s stylesheet when MD rebuilds it, so file edits wait for the next save. With the option off, the child stylesheet loads on its own and updates when you change it.
  • You replaced the theme’s files by FTP, a file manager, or a deploy tool. Only updates made through WordPress trigger a rebuild.
  • You moved the site without the wp-content/uploads/marketers-delight/ folder. The stylesheet does not exist on the new server, and the site loads without MD’s styles.

Fix: Go to Theme → Settings and select Save. Either save rebuilds every compiled file. Then purge your caches.

MD cannot write the compiled files

Symptom: You save and MD shows a notice that it could not write its compiled files, or the version number still does not change after you purge every cache.

Cause: MD writes its files to wp-content/uploads/marketers-delight/ through the WordPress filesystem, without asking for connection details. If the uploads folder is not writable by WordPress, or WordPress needs FTP details to write files and they are not saved in wp-config.php, the write fails. MD keeps the previous file in place so your site keeps its styles.

Fix:

  1. Confirm WordPress can write to the uploads folder: upload an image to the Media Library. If the upload fails, ask your host to fix the folder’s permissions.
  2. Confirm wp-content/uploads/marketers-delight/ exists and has the same owner and permissions as the rest of uploads/. If the folder is missing, MD creates it on the next save when the uploads folder is writable.
  3. Select Save again and recheck the version number.

Note: After a theme update, MD retries the rebuild on every page load until it succeeds, so fixing the permissions is enough for that case.

Check the result

Open your site in a private window. The design change shows, and the style.css version number in the page source is newer than the one you noted. If only some visitors still see the old design, a CDN or host cache has not finished purging; purge it again and wait a few minutes.

Alex Mangini

Hi, I'm Alex! I started writing about web design and blogging at 13 years old, which turned into client work, which led to building my own software. 15 years later I'm still at it, and Marketers Delight is the epitome of my philosophy for building on the web.