Multisite theme directory name

Hi, I have a multi-site network set up but have named the theme directory for one sub site incorrectly. The theme is used by 1 network site. Could you please advise on how to update/correct this properly?

  • Paul Barthmaier
    • Code Wrangler

    Hi there,

    Sorry to hear you are having some trouble with your site. What I'm hearing is that you changed the name of the folder in which subsite's theme files live. I'm suspecting that not only did your theme of the site revert to the default, but you now can't find the theme where it was in your Network Admin. Would this be fair to say?


  • fortyfivecreative
    • Flash Drive

    Hi Paul, I have full access to ftp and the database, so that isn't a problem. My issue is simply that I was under the impression that you cannot just re-name a theme folder and that there are various database entries that would need changing too?

    I may be wrong, but haven't yet tried re-naming the directory in case it all goes wrong! :slight_smile:

    Thanks in advance

  • sakumatto
    • Design Lord, Child of Thor


    Hope you get the snag fixed. In order to avoid the mess in the future, have you tried to preselect the theme by adding

    define('WP_DEFAULT_THEME', 'twentytwelve');

    into you network site wp-config.php file? This would set the default site theme to any theme name you insert there whenever you create a new site.

  • Paul Barthmaier
    • Code Wrangler

    Hi there,

    Wordpress will look for folders in your Theme folder that have a style.css for theme files, so it's not really important what the folder's name is for Wordpress to find the theme. Once it's found a style.css, it will look to the header information to see what the name of the theme is, and that name will be displayed in your Theme's dashboard. If it finds a Template: tag in the header, then it knows it's a child theme and should expect to find the stylesheet for child theme in the parent folder. The Template name is the parent folder, not the parent theme's name.

    The concern you have also involves the stylesheet and therefore folder name. The stylesheet information is, in fact, stored in the database, but is also accessible in the admin section of the dashboard. If you were to go to your Settings tab under Edit Site you can scroll down and make the change. Appending this string to your root domain

    • /wp-admin/network/site-settings.php?update=updated&id=

    plus the number of your subsite will take you to the Settings tab. Scrolling down (about 8 lines below your Home field) you'll find your Stylesheet. Just above it will be the Template field. If the two are the same you have a parent theme enabled for the site. If the two are different, a child.

    You'll also notice that even further down on your settings you have two fields Template Root and Stylesheet Root, both of which probably have a value of /themes. This is how Wordpress is finding your themes. Just below it is Current theme, which, well, you can guess what it is, but notice that it's the name that is specified in the header of the theme, not the name of the folder.

    Maybe more than you wanted, but hope this helps.


    Locked yourself in EasyBloggin? Relax:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.