Custom CSS being blown away
-
Hiya! My team recently created an ansible script to deploy out our WordPress servers, mainly to reduce tech debt for our currently very old server. Since then, we’ve been noticing that the Custom CSS is being periodically blown away.
e.g.,mysql> select * from wp_options where option_name like "%frn_wordpress_theme%";
+-----------+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
| 463 | theme_mods_frn-wordpress-theme | a:6:{i:0;b:0;s:18:"nav_menu_locations";a:4:{s:7:"primary";i:11;s:6:"topbar";i:12;s:11:"footer-left";i:13;s:12:"footer-right";i:14;}s:28:"understrap_posts_index_style";s:7:"default";s:27:"understrap_sidebar_position";s:5:"right";s:25:"understrap_container_type";s:9:"container";s:18:"custom_css_post_id";i:20556;} | yes |
+-----------+--------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
1 row in set (0.01 sec)reverts to
mysql> select * from wp_options where option_name like "%frn_wordpress_theme%";
+-----------+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
| option_id | option_name | option_value | autoload |
+-----------+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
| 463 | theme_mods_frn-wordpress-theme | a:6:{i:0;b:0;s:18:"nav_menu_locations";a:4:{s:7:"primary";i:11;s:6:"topbar";i:12;s:11:"footer-left";i:13;s:12:"footer-right";i:14;}s:28:"understrap_posts_index_style";s:7:"default";s:27:"understrap_sidebar_position";s:5:"right";s:25:"understrap_container_type";s:9:"container";s:18:"custom_css_post_id";i:-1;} | yes |
+-----------+--------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+
1 row in set (0.01 sec)This theme is a child theme of understrap, and we were not encountering these issues with the old servers.
There are definitely some differences with our new servers compared to the old. For one, we now have two servers behind a load balancer, rather than a single server. And the latest servers are on PHP 8 vs. PHP 7.
I’m not quite sure what to make of this – the plugins we have aren’t particularly obscure, and should be compliant with the latest versions of PHP and WordPress. Not to mention they haven’t changed between the servers.I’ve validated the CSS we’ve been using, and it doesn’t appear to be blown away by a cron run, including by AMP’s stylesheet verification… so I think the CSS is fine.
It does appear to be somewhat traffic-related, the value can persist for half an hour when it’s quieter, but a mere minute after we drop a new post to our mailing list.
We can of course implement the CSS directly in our child theme (and I’ve done so for now), but I’m worried this could suggest there are other odd things happening under the hood messing with our customizations.
I am most happy to provide more details, I just wanted to get the ball rolling on this topic in case anyone else has encountered this strange behavior. Thank you for your attention.
The topic ‘Custom CSS being blown away’ is closed to new replies.