How to prevent WP from automatically reverting to Twenty Twenty-One Theme?
-
Having a strange issue where my site keeps reverting back to the Twenty Twenty-One theme because WP think’s our custom theme is broken. Sometimes it’s the whole site, sometimes it’s only the homepage and all other pages keep using my custom theme as normal.
When I go to wp-admin’s Themes section, my custom theme that I’ve used for years with no issues is still set to Active, however, there’s a note above it saying: “The active theme is broken. Reverting to the default theme.”
Just looking for a quick fix here to get my site back to working normal while I investigate updating WP and my theme, so far I’ve tried:– Clearing/Removing all of my caching plugins
– Manually changing the wp_options table’s template, stylesheet, and current_theme values to be my custom theme’s name (this seems to instantly fix the problem, but after a few hours it seems like WordPress reverts back to Twenty Twenty-One)
– Deleting the Twenty Twenty-One theme from my server’s Themes folder (somehow even without a theme folder/files WP switches back to this theme)
– Remove various code from the wp-includes/theme.php file that seem like would be checking for this “broken” state and causing the site to revert
Is there anything I can add to my functions.php file or somewhere else to ensure that WordPress either doesn’t check for the theme being broken or forces my custom theme to always be used?The page I need help with: [log in to see the link]
- The topic ‘How to prevent WP from automatically reverting to Twenty Twenty-One Theme?’ is closed to new replies.