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.
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.
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
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.
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:
Export all data using the native WordPress Export tool
Login to Bricks to export the Global Theme Styles, CSS Classes, and Colour Palette separately (will create JSON files)
Setup Bricks on new install
Import all WordPress data using the native WordPress Import tool
Import Bricks Global Theme Styles, CSS Classes, and Colour Palette separately
Regenerate CSS files in Bricks Settings if using external CSS files
@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.