Change Default Theme For WordPress Multisites


When you create a new site in your WordPress multisite network, WordPress automatically assign a theme to your new site. It does not use the themes that you have installed or activated on the other sites but will use the default WordPress theme that is setup in WordPress regardless of its existence in themes folder. Depending on the version of WordPress you are using it will use a different default theme. For example in latest (so far) WordPress 3.8, the default theme for all new sites is Twenty Fourteen. We can not change default theme without editing core WordPress files because the default theme is defined in the file default-constants.php.

Although it’s not a huge problem because you can always change it to some different theme or with your custom theme by visiting WordPress admin panel. But it could be an issue if you are like me who always delete all default themes and plugins bundled with WordPress. Except of course, Akismet anti-spam plugin. So, if you have also deleted default WordPress themes in your multisite network then you will be displayed error page or blank screen. It does not sound that bad for couple of sites to change theme in admin panel but if you have created few dozens of sites or many be a hundred site. Now you get the picture.

So it’s always a good idea to change default theme in your WordPress multisite network. You can override the default theme by editing your wp-config.php file. Just add the following code anywhere before the line where WordPress includes the wp-settings.php file.

This is how it will look in your wp-config.php file.

// change default theme for wordpress multisites
define( 'WP_DEFAULT_THEME', 'my-custom-theme' );

require_once(ABSPATH . 'wp-settings.php');

Leave a Reply

Random Post Selection ::

Recent Posts

Unlock Unlimited Downloads