Reputation: 167
I am trying to rename my theme folder in the wp-content/themes
folder, but it keeps breaking the site and meaning that I have to re-upload the logo, change all the colors again and etc.
It's a bit long and frustrating.
Is there any way I can rename the folder ( change anything in the database and etc ) which stops it from resetting settings?
Upvotes: 5
Views: 6276
Reputation: 2960
Yes, you can change the directory name of your active theme/child theme. The steps you need to do for Parent Theme:
Go to phpMyAdmin, find your wordpress installation database, find the table {your-db-prefix}_options
(by default it's wp_options
) and find the template
from column option_name
. Change it's option_value
to your theme directory new name. That row will look something like:
option_id | option_name | option_value
---------------------------------------------------------
{some_id} | template | twentyseventeen
If you're going to change the folder name of Child Theme, then instead of template
you should find the record stylesheet
and make same steps as for Parent theme.
This will prevent deleting Theme options from database.
Upvotes: 6