I started developing a website, and midway through I changed the URL. I was and still am an amateur so unfortunately I've had some issues with the database now that I'm trying to go back and clean everything up. Just for example, let's say I was thehappyshoestore.com and now I'm thehappyshoe.com.

In Wordpress, there is a section called "Additional CSS." I loved this tool when I was first starting to learn, but now I'm having some issues locating some rules I wrote a long time ago. I looked through every folder for the location of that stylesheet until I found a post on here that said to look in PHP MyAdmin. I noticed it's taking around 500 ms to load it on GT Metrix Waterfall so I wanted to just put the code in the child theme's stylesheet instead.

When I added Cloudflare to my site, the old URL that is a parked domain for the new URL was down for a bit and I noticed that several CSS rules weren't applying. These were rules that I wrote awhile ago prior to changing URLs, but I see now they are no longer in the additional CSS section nor in the custom_css database table, only the new rules are. I also see that the GUID for this entry still has the old site in its URL.

What I would like to do is take all the old rules plus the new ones and add them to the child theme's stylesheet to improve performance. The problem is that I cannot locate the old rules, and I have no clue where it's pulling them from. They are still in effect because if I try to remove an inline html class, it visibly alters the appearance so the rules are still being applied, I just don't know where to look to find them. Any recommendations for locating those old rules would be greatly appreciated.

  • If they're showing on the frontend, could you pull them from there? Viewing the pages source in the browser should contain the CSS. Otherwise, it's difficult to answer this question with no PHP code and no examples of the CSS, or the frontend of the site. Any answer would deal with only hypotheticals as a result – Tom J Nowell May 17 '19 at 1:14

Custom CSS contents are kept as separate post type named custom_css. Say, for theme named Simple Life, post entry would be simple-life for post title and post slug. CSS are kept under post_content. So, database table you should be looking for is wp_posts.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.