When you switch to a different theme, your custom CSS changes are indeed deactivated since you wouldn’t want changes applied to a theme come and potentially break a brand new theme you’ve just installed.
You should find the previous versions back in the revisions though, unless you use a plugin or a constant in your site’s wp-config.php file to deactivate revisions. Is that the case on your site?
Thread Starter
BeRKA
(@zhoberka)
No, nothing like that in config.php and no plugin to deactivate revisions.
Can you reproduce the problem if you switch themes once again? I’d love to be able to understand what went wrong.
Thread Starter
BeRKA
(@zhoberka)
This time I could get the css for 20-11 from the “css revisions”.
Maybe this is something that can only happen the first time?
I hope you can figure it out, but it is not a critical issue for me.
I tried again on another test site with a fresh installation of Jetpack, and my changes were properly saved and accessible in the revisions.
Could you post again here if it ever happens again?
Thanks!
Thread Starter
BeRKA
(@zhoberka)
It did it again.
I was trying out a child theme for 20-14. When I switched back to 20-11 my custom css was gone and couldn’t be found in the revisions.
Could you walk me through the exact steps you followed, so I can try to reproduce the problem?
Could you also access your database and look for all CSS revisions in the wp_posts table, along your Posts, Pages, and other Custom Post Types?
Custom CSS revisions use the safecss post_type, so you should be able to find them by filtering all posts with this Post type. I would like to know if the CSS revision you’re looking for can be found there.