1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to change WP theme folder name?

Discussion in 'Blogging' started by TheMatrix, Sep 27, 2009.

  1. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,279
    How to change WP theme folder name?

    Lets say the name is ABC, and I want to change it to XYZ, it is not running. How can I safely do that?
     
  2. 195471

    195471 Regular Member

    Joined:
    Oct 11, 2008
    Messages:
    417
    Likes Received:
    260
    Normally, you would just change the folder name through your FTP client, but WP doesn't like you changing folder and file names after you've uploaded them. I almost always rename my themes, and what I do is rename the folder for the theme locally (i.e., on my hard drive, before I upload it to the server). I also edit the CSS with my new theme name. If you do the edits before uploading to your server, WP should be okay with it.
     
  3. JDRic

    JDRic Registered Member

    Joined:
    Mar 2, 2009
    Messages:
    72
    Likes Received:
    14
    If you change the name of the theme when it is active on your blog, it will break and you will probably fall back to the default theme.

    You can safely activate the same theme again though. All should work fine, you don't even need to change the theme name on the CSS file.

    I am assuming of course that the theme isn't calling files by their exact urls...
     
  4. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,279
    Please someone give answer when sure..I cannot take any risk!!
     
  5. 195471

    195471 Regular Member

    Joined:
    Oct 11, 2008
    Messages:
    417
    Likes Received:
    260
    Here's what you can do without the risk of getting things messed up:

    1) Activate a different theme than the one you want to rename. For example, choose "Classic" or "Default". If you deleted them from your themes folder, just re-upload one of them and activate it.

    2) Once another theme is activated, delete the theme that you wanted to rename from your server. On your computer, rename the theme folder that you want to rename. I would also recommend changing the name of the theme in the stylesheet (where it says "Theme Name") to the name that you just created for your folder. This will keep everything consistent and prevent people from easily seeing what theme you're actually using.

    3) Upload the new theme to your themes folder.

    4) Activate the theme.
     
  6. TheMatrix

    TheMatrix BANNED BANNED

    Joined:
    Dec 20, 2008
    Messages:
    3,444
    Likes Received:
    7,279
    @195471: Thanks, I will try this now
     
  7. ericsson

    ericsson Elite Member Premium Member

    Joined:
    Apr 25, 2009
    Messages:
    2,642
    Likes Received:
    8,132
    Occupation:
    www
    Location:
    Swe
    Home Page:
    You shouldn´t change folder name when they are active..
     
  8. 195471

    195471 Regular Member

    Joined:
    Oct 11, 2008
    Messages:
    417
    Likes Received:
    260
    Exactly, which is why I told the OP to activate a different theme, delete the one that he wanted to change, and then go ahead and change the folder name on his/her local machine, and finally, upload the edited folder to the server.