Changing the Wordpress theme name through Terminal / MYSQL
If you end up deleting your theme and theres an error thrown, you might end up with a MYSQL entry for a theme that doesn't exist or broken.
Check the current value
SELECT * FROM wp_options WHERE option_name = 'template' OR option_name = 'stylesheet' OR option_name = 'current_theme';
Run this command on your MYSQL to replace
UPDATE wp_options SET option_value = 'twentyfourteen' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'twentyfourteen' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'Twenty Fourteen' WHERE option_name = 'current_theme';
Verify
SELECT * FROM wp_options WHERE option_name = 'template' OR option_name = 'stylesheet' OR option_name = 'current_theme';
Should Provide
+-----------+---------------+----+----------+
| option_id | option_name | option_value | autoload |
+-----------+---------------+-------+-------+
| 156 | current_theme | Twenty Fourteen | yes |
| 42 | stylesheet | twentyfourteen | yes |
| 41 | template | twentyfourteen | yes |
+-----------+----------- ----------+----------+
Written by Rodrigo Garcia
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Wordpress
Authors
Related Tags
#wordpress
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#