NO BUG: Global Styles & CSS Classes are not exported when using WordPress Tools > Export function

Bricks Version: 1.6.2

I was trying to migrate data over to a new “cleaner” website without all the cruft in the database, and wanted to do a clean migration using the WordPress Export & Import tools so that it’d bring in all custom post types, Bricks templates, Pages, Posts, etc.

However when doing so, I realized that while most of the content came over, Bricks was missing the Global/Theme Styles and the CSS classes assigned to elements on the pages. Specifically when using the External CSS files method, I could see two files missing when generated in the new site compared to the old site:

  • global-elements.min.css
  • color-palettes.min.css

The other files below were still there, it was the two above that were completely missing.

  • post-13.min.css (Page)
  • post-40.min.css (Page)
  • post-491.min.css (Page)
  • post-693.min.css (Page)
  • post-695.min.css (Page)
  • post-20.min.css (Template)
  • post-72.min.css (Template)
  • post-347.min.css (Template)
  • post-1146.min.css (Template)
  • theme-style-global.min.css

This prevents a clean export of Bricks content into a fresh WP install. Please fix this bug. Thank you in advance. Let me know if there’s any other information I can provide.

Hi Dustin,
Thanks so much for your report!

The WordPress Export & Import tool exports or imports content (posts, pages, custom post types) other supported data (e.g. MetaBox Relationships, Settings Pages, …). The Bricks Theme Styles and Color Palettes are neither one nor the other and each have a separate export function that you can use.

Color Palettes
Select the color palette you want to export, click the little pencil icon and hit the export icon.

Theme Styles
Go to settings » Theme Styles, click the little pencil icon and hit the export icon.

So far there is no demand (see Idea Board) and there are no plans to retrieve this data via WordPress Export / Import.

Best regards,
timmse

1 Like

Hi @timmse,

I was able to find out how to export the colour pallet and global theme styles but the thing that was still missing is each individual CSS class for any element I had added. How does one transfer those without having to do every single one independently?

Overall, how does one transfer a site “cleanly” so that all the orphaned data isn’t transferred over too? That’s what I was ultimately trying to achieve… migrating data to a clean site which is where the WordPress Import/Export comes in but isn’t working yet for Bricks content.

Hi @timmse, I submitted a new idea to the idea board for exporting colour pallets and global styles as part of WordPress Import/Export process, hopefully that’ll be approved soon. In the meantime the issue of CSS classes on elements not transferring over either I believe is still a bug. Can we please update the title accordingly once you’ve verified?

Hey Dustin, you can export or import classes and styles :nerd_face:
While in the class list, there is a little ex-/import icon that allows you to ex- or import your classes:

Basically, I agree that it would certainly be easier if everything could be exported together with just one click - but let’s wait and see, maybe your request will end up on the Idea Board.

If you still have issues with it, please create a new report, since this one is about the WordPress import and export tool, which is currently not supported.

Best regards,
timmse

2 Likes

Thanks so much @timmse, that works. I’m happy to hear that at least the CSS classes don’t need to be exported one by one. So basically (for anyone else coming across this) it seems these are the steps, roughly when migrating a Bricks site using the WordPress Import/Export:

  1. Export all data using the native WordPress Export tool
  2. Login to Bricks to export the Global Theme Styles, CSS Classes, and Colour Palette separately (will create JSON files)
  3. Setup Bricks on new install
  4. Import all WordPress data using the native WordPress Import tool
  5. Import Bricks Global Theme Styles, CSS Classes, and Colour Palette separately
  6. Regenerate CSS files in Bricks Settings if using external CSS files
3 Likes

@timmse I’m in a similar boat here but for a different reason. I have a WordPress Multi-site and I am using “distributor plugin” to sync pages across websites, this way I have one page as the source of truth, and whenever it get’s updated all the other pages also get updated.

However, the CSS classes are not coming over to the synced sites, for I’m assuming is the same issue here.

Do you know if there is a way I can access these classes and styles so I can add them to the elements? If this can be done, then I can modify the distributor plugin to include it.

Thanks

Hi David,
Your topic is completely different as the original report, as far as I understand.

Each website in a multisite network has its own set of classes, which won’t sync between the installations - that’s the expected behavior.

As already mentioned, you can export the classes (manually) and import them into other installations. There is no automated process for this.