Can I change the theme name in WordPress?

2020-05-24 20:37发布

How can I change the theme name in WordPress and where?

Can I also change the folder name theme1244 in public/wp-content/themes/theme1244 without having problems in the future?

5条回答
爷、活的狠高调
2楼-- · 2020-05-24 21:09

I changed my theme name in wp-content/themes/{your site name folder}/style.css I am using a child theme

/*
Theme Name: WhateverYouWantToNameIT
Template: twentytwenty 
*/
查看更多
不美不萌又怎样
3楼-- · 2020-05-24 21:10

All the above is correct, but is not enough. After you rename the theme, e.g. rename the folder old-theme --> new-theme, you should copy the theme customizations (colors, header / footer, widgets, etc.) from the old theme to the new theme. This is done directly in the MySQL database:

  1. Find an option named theme_mods_old-theme in the table wp_options
  2. Copy the option_value (it is a text holding the theme customizations in a special WordPress format)
  3. Put the copied value in a new option named theme_mods_new-theme in the wp_options table.

Screenshot of the wp_options table in phpMyAdmin

查看更多
我想做一个坏孩纸
4楼-- · 2020-05-24 21:20

Step 1: Firstly go to wp-content/themes/ folder. And then rename your theme folder to whatever you want.

Step 2: Open your theme folder and open style.css file. In top part of style.css you will see theme name. Rename it and save changes.

Step 3: Go to Wp-admin/appearance/themes and activate your theme under new name.

If you are using child/parent theme and you also rename parent theme folder&name, so after Step 3 you should additionally change parent theme path in child theme’s style.css.

note : renaming your theme will stop its automatic updates, you should do it manually in the future.

查看更多
啃猪蹄的小仙女
5楼-- · 2020-05-24 21:22

Its absolutely easy and simple, just follow instruction
1. Just rename theme name with your desire theme name.
2. open your desire theme name and open style.css file, and find theme name and changes with your desire theme name.
3. you can see your desire theme in admin dashboard-> appearance-> themes, just select and activate it.

查看更多
你好瞎i
6楼-- · 2020-05-24 21:28

You can absolutely change the name of the folder without having any problems. If you want to change just the themes name, open the style.css in the root folder of your theme and edit the name in the comments at the top of the file. If you plan on doing more changes, you might be better off creating a child theme: https://codex.wordpress.org/Child_Themes

查看更多
登录 后发表回答