Chris Pokrzywa
Chris Pokrzywa

Reputation: 163

I changed my Wordpress theme folder. Now it's not finding my stylesheet after I changed it back

I hope this is a quick fix, but I've been searching for a solution and haven't found one.

Quick background: I've been developing my Wordpress website locally using WAMP. I'm getting the site ready to deploy to a production server, and before deploying it I wanted to simply rename my theme folder from "naked-wordpress-master" to "My Portfolio" or something different.

First, I went to my theme folder and changed the name. I refreshed the Appearance > Themes page in the wp-admin site and got an error that the stylesheet could not be found.

I got a bit worried, so what I did next was rename the theme folder back to "naked-wordpress-master" and refresh the page. Same error.

I then tried deleting the theme from the wp-admin site and re-uploading it. I got an error the upload failed because the stylesheet couldn't be found.

FYI I'm using SCSS that outputs a style.min.css, but that shouldn't matter. I didn't change anything else from the header, functions.php, or stylesheet linking and it was all working just fine before.

Any ideas on what's going wrong and why my stlyesheet is failing to get recognized?

Thanks a bunch.

--Update-- I'm noticing my index.php loads fine, but sub-pages look like this

Upvotes: 0

Views: 1442

Answers (1)

zipkundan
zipkundan

Reputation: 1774

In your database find the "_options table (table prefix could be what ever you have set while installing wordpress). In options table, find the entries for "template" and "stylesheet" (both are different entries) and check their corresponding values. If that is not your theme name, change it manually to your theme name.

Also, make sure your theme has style.css at its root location. That's a technical requirement for enabling the theme.

After Update

Seems like its a rewrite issue. Check if the .htaccess file exists.

If it doesn't, in admin are, go to settings->permalinks, change the permalinks settings to something different, save the settings and revert back to what ever you had set before. (Ideally you should select the "post name" setting, which generates pretty permalinks which are also SEO friendly)

This will flush the permalink rules and also create the .htaccess file if its missing.

Hope this helps.

Upvotes: 1

Related Questions