• orenkom28

    (@orenkom28)


    Hello,

    I am using a self-hosted WordPress website and I have experienced a strange issue with Appearance → Customize → Additional CSS.

    After an update, I noticed that the Additional CSS field had suddenly become completely empty, even though I had not manually deleted or changed the CSS.

    Fortunately, I was eventually able to recover the CSS through the WordPress database and its revision history.

    However, I would like to understand what may have caused this and whether this is a known WordPress issue.

    In particular, I would appreciate your help with the following questions:

    • Can a WordPress update cause the Additional CSS field to become empty or stop loading its saved content?
    • Is it possible for the CSS to still exist in the database while the Customizer displays the Additional CSS field as empty?
    • Are there any known issues related to this behavior?
    • What is the recommended way to prevent this from happening again?

    The website is using the Astra theme, but the CSS in question was saved specifically through Appearance → Customize → Additional CSS.

    I would be happy to provide any additional technical information that may help identify the cause.

    Thank you very much for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @orenkom28

    I downgraded my WordPress, added Astra theme, some custom CSS and upgraded to the latest version but the CSS remains.

    I also made this test:

    Added a custom CSS, then tried to locate that CSS on my database to confirm where it was stored and it is coming as custom post type on astra theme.

    SELECT * FROM wp_3f_posts WHERE wp_3f_posts.post_name = "astra";

    Replace the wp_3f_ with your prefix.

    It isn’t possible to say what happened and how to prevent, the most important step is taking backups prior updates to ensure you have a safe point to rollback.

    I also suggest not trying to add the CSS back at “Appearance → Customize → Additional CSS.” until you troubleshoot so it doesn’t risk overriding if the values still exist in the database.

    If you confirm the SQL query shows your custom CSS then I would try a full plugin conflict test https://wpmudev.com/docs/getting-started/getting-support/#conflict-test

    Best Regards
    Patrick Freitas

    Thread Starter orenkom28

    (@orenkom28)

    Hi Patrick,

    Thank you very much for taking the time to test this.

    I can confirm that in my case the CSS was still present in the database. I was able to find the custom_css entry associated with Astra, as well as multiple revisions containing the CSS.

    The strange part is that the Additional CSS field in the WordPress Customizer appeared completely empty, and the affected CSS was no longer being applied on the website. So it seems that the CSS data itself was not actually deleted from the database, but WordPress/Astra somehow stopped loading the saved version correctly.

    I was eventually able to recover the CSS from one of the database revisions and restore it manually.

    I should also mention that I have not installed any new plugins for a long time. The issue appeared suddenly, without me adding a new plugin or intentionally changing anything related to the Additional CSS. Of course, existing plugins may have received updates, so I understand that a plugin conflict still cannot be completely ruled out.

    Since the data was still present in the database, do you think this points more toward a plugin conflict, an Astra/Customizer issue, or perhaps the active custom_css post/revision relationship being changed during an update?

    I can perform a plugin conflict test, but since this is a live WooCommerce website, I would prefer to avoid disabling plugins on the production site if possible. Is there anything specific in the database or WordPress logs that you would recommend checking first?

    Thank you again for your help,
    Oren

    Hi @orenkom28

    You can use the https://wordpress.org/plugins/wp-staging/ which gives you the staging in few clicks, but still, make a full backup.

    I believe the plugin conflict test is the best initial approach yes, if no results then https://wordpress.org/support/theme/astra/#new-topic-0 can help you further as it seems more specific to Astra than to WordPress core.

    Best Regards
    Patrick Freitas

    Thread Starter orenkom28

    (@orenkom28)

    Hi Patrick,
    Thank you, that makes sense.
    I already have server-level backups, and it appears that I may also already have a staging environment on the server. I’ll check that first before installing an additional staging plugin.

    I’ll perform the plugin conflict test on staging, and if the issue cannot be reproduced or traced to a plugin, I’ll continue with the Astra support forum as you suggested.

    Thank you again for your help and for pointing me in the right direction.

    Best regards,
    Oren

    laixhe

    (@laixhe)

    Good day Oren

    ! Just checking if your issues has been resolved? Let us know you need anything else.

Viewing 5 replies - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.