Change the default theme for sites without a plugin

There’s a new and very little documented feature in 3.0 for changing the default theme. And? This will work on single WordPress installs as well as being handy for a network of sites.

The magic line is this in your config file:

define('WP_DEFAULT_THEME', 'classic');

In this example, the classic theme is used as the default when a site is created, or when a theme in use is removed. If you are starting fresh with 3.0, the default is the new TwentyTen, so this override is handy.

Added tip: if you have a lot of blogs using the Kubrick theme and wanted to remove it and set the other blogs, do this define first with your new default theme, then remove or rename the Kubrick theme folder (in my it was simply “default”). On a refresh, all blogs using the Kubrick theme will be switched to your new default.

If you just wanted the Kubrick theme to go away and have twentyten show up, you won’t need to do the define above. Just rename the /default/ theme folder. It’ll kick in.

(thanks to Ron for reminding me & MichaelH for the codex note I missed)

[Post to Twitter] Tweet This Post 



Random Posts

    bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark
    tabs-top  banner ad
    

    9 Responses to “Change the default theme for sites without a plugin”

    1. David Gilmour
      Twitter: dgilmour
      says:

      Thanks Andrea, I’d been wondering!

    2. asshu says:

      I tried the code.But nothing is changed. The same “TwentyTen” .

    3. asshu says:

      I don’t have the plugins like “New Blog Defaults” .But I installed plenty of plugins of different kinds.

    4. Philippine Outsourcing
      Twitter: philoutsourcing
      says:

      Thanks for this … I’ve been searching in the wrong places and thought it was part of the control panel … Andrea rocks indeed!

    5. asshu says:

      I am getting a blank page If I try any of these themes other than classic .
      Overdose40
      Mystique
      ChocoTheme
      WordPraized

      Could you tell me where I am missing?

    Leave a Reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture.
    Anti-Spam Image