Site logo

Archived topic

CSS in Customizer disappeared!

7 replies · Started by mc208 on April 7, 2022

Viewing posts 1–8 of 8

I noticed something looked broken on my site, so I went to the Customizer where that CSS was added, and not just that CSS, but ALL the CSS in the Additional CSS area of the customizer has disappeared. Did anyone else experience this? I'm not sure when it happened, or if it's even a theme issue. Any suggestions? Thank you.

Hi there,

The additional CSS field in a WP core option so it's definitely not a theme issue.

I would say that the best solution would be to restore a working backup.

Hope this helps.

Ok thank you.. I actually did restore a backup from two weeks ago and it seems to be gone from there too.

I was able to get a backup from February 3 before the last GP update, and I have the database. I found this:
https://wordpress.org/support/topic/additional-css-storage-location/

It is not stored in files ,It’s stored in the database, within the wp_posts table, under the custom_css post type, where the post name is the theme slug

What is the "theme slug" for generatepress so I can try and find this missing css?

It should be GeneratePress.

Just to confirm, have you activated a child theme during this period?

The Additional CSS option is attached to the theme. So if the code was added in the parent theme and a child theme is activated then it would need to be re-added.

No I haven't done anything with child themes. I just happened to notice something was wrong on my site, and I went back to see how that feature was developed, and it was with CSS in the customizer. so when I went to the customizer, additional css area, no CSS was in the box. It just magically vanished; it's been there for years, no reason for it to disappear. So I'm HOPING that the CSS is in this older backup. I'm trying to use mysql workbench to search through the database to find it, but it's not easy.

I was able to download a backup from February 3. Fortunately, I have a screenshot of some of the CSS that was in the customizer. I opened the .sql file from the backup and did a simple Find for some of that CSS and sure enough it came up, now I Just have to extract the css from that file and copy it back into my live site. It seems that the CSS was lost from the customizer during a previous GeneratePress update, perhaps 3.1.3. Don't know how or why that happened, but I will keep a backup of the CSS in the customizer from now on =(

Sounds good :)

This archived topic is closed to new replies.