如何通过直接修改数据库来改变WordPress所用皮肤

首先,确认下wordpress/wp-content/themes目录下有哪些已安装的皮肤:wordpress-themes

然后进入mysql执行命令:

mysql> UPDATE wp_options SET option_value = ‘portfolio-press’ WHERE option_name
= ‘current_theme’;
Query OK, 1 row affected (0.01 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> UPDATE wp_options SET option_value = ‘portfolio-press’ WHERE option_name
= ‘stylesheet’;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> UPDATE wp_options SET option_value = ‘portfolio-press’ WHERE option_name
= ‘template’;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

wordpress-themes-sql

重新刷新页面就能看到新的主题。

参考:http://www.jb51.net/cms/69651.html

 

标签