Title: Set a Fallback Theme
Last modified: December 6, 2023

---

# Set a Fallback Theme

 *  [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * (@jasperdemann)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/)
 * Is it possible to set a specific fallback theme, instead of having to use one
   of the WP ones?
   I’ve tested 2024 thru 2020 and each of them makes my site unusable.
   Astra, however, looks 98% like my regular theme, Hello Elementor, when loaded.
 * Ideally, I’d like it to automatically change over if there was a problem with
   Hello Elementor as I live on the opposite side of the world to my target audience
   so if something did happen, I’d probably be asleep while they’d be trying to 
   access my site!

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

 *  [Cate DeRosia](https://wordpress.org/support/users/mysweetcate/)
 * (@mysweetcate)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17257502)
 * I believe the answer to this is surprisingly simple. All you need to do is delete
   all themes from Appearance-> Themes that you **do not** want to use. That will
   leave your primary theme which you will activate and Astra as your back up should
   the primary break.
 *  Thread Starter [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * (@jasperdemann)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17257519)
 * That *does* sound surprisingly simple, thanks!
 * I’ll give it a try tomorrow.
 * How would I test that it would work when it’s needed?
 *  [Aniekan](https://wordpress.org/support/users/anieeedet/)
 * (@anieeedet)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17257729)
 * Hi [Jasperdemann](https://wordpress.org/support/users/jasperdemann/),
   There is
   no built-in feature to set a custom fallback theme. However, you can achieve 
   this functionality using custom code.Here’s a basic example of a custom PHP script
   that activates the Astra theme if the Hello Elementor theme fails to load:`function
   custom_fallback_theme() { ` `if (!function_exists('hello_elementor_init')) {``
   switch_theme('astra'); ` `}`` } ``add_action('init', 'custom_fallback_theme');`
   This script checks if the <code class=””>hello_elementor_init function exists,
   which indicates that the Hello Elementor theme is active and functioning properly.
   If the function is not found, it switches the active theme to Astra.This can 
   help ensure your website remains accessible and functional regardless of potential
   problems.You can use the [Code Snippet Plugin](https://wordpress.org/plugins/code-snippets/)
   to add the script to your site.Hope this helps!
 *  [Cate DeRosia](https://wordpress.org/support/users/mysweetcate/)
 * (@mysweetcate)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17257937)
 * I’m not sure there’s a way to test it. I believe it’s setup to use whatever theme
   is available should the active theme fail or have an issue.
 *  [Samedi S. Amba](https://wordpress.org/support/users/skyoyugi/)
 * (@skyoyugi)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17259957)
 * I’ll add another twist to the answers already given:
    - You will need to ensure that any other theme you don’t need by default is 
      disabled, so that you only have the active theme and the fallback one. This
      is for safety’s sake.
    - You will need at least one default theme in the radar. By experience, they’re
      simply designed and can provide the knack to troubleshoot when you need something
      barebones.
 * Great answers here, though!
 *  Thread Starter [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * (@jasperdemann)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17260523)
 * Thanks for your help, everyone.
   I’ll keep Hello Elementor active, Astra installed
   and I’ve added the code.Cheers!
 *  Thread Starter [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * (@jasperdemann)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17260586)
 * Hi, [@anieeedet](https://wordpress.org/support/users/anieeedet/)
 * I added the code, but it deactivates Hello and activates Astra permanently.
   If
   I try to activate Hello, the page refreshes but Astra is still the active theme.
 *  Thread Starter [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * (@jasperdemann)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17283907)
 * Anyone got any advice?!
 *  Thread Starter [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * (@jasperdemann)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17323852)
 * Anyone?!!

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

The topic ‘Set a Fallback Theme’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 4 participants
 * Last reply from: [jasperdemann](https://wordpress.org/support/users/jasperdemann/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/set-a-fallback-theme/#post-17323852)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
