Link to home
Start Free TrialLog in
Avatar of Richard Korts
Richard KortsFlag for United States of America

asked on

WordPress Child Theme Issue

I have addressed this issue before, now I am down to brass tacks (crunch time).

We have a staging site that we have used for about 3 months to develop some custom stuff to add to an Enfold Theme WordPress site.

Meantime (since June), the live site has had numerous content updates. We are trying to merge the two.

I decided on this approach.

(1) I dropped all the wp- tables from the staging site database, then copied over the same from the live site, using phpmyadmin.

(2) The site now thinks it's using the base (not child) theme, but it recognizes that the child theme is there, I activated the child theme, I had to reset things like the logo, favicon, home page, etc. That was fine.

(3) If you use the Editor (Themes, Appearance), the CSS, functions.php & header.php are all there (as they were BEFORE copying over the DB tables), but it does not appear to be applying the CSS to the theme. The site appearance, once I recreate the child theme, is what looks like some garish color scheme, etc. I remember before when I first did that, it looked like that too.

Is there something I have to do to the child theme to make it use the custom css? I'm not sure if it's using the custom header & functions. How can I make that happen?

Thanks
Avatar of Terry Woods
Terry Woods
Flag of New Zealand image

Could it be a caching issue? Are you using any caching plugins? Have you tried loading the site in a private browser window?
Avatar of Richard Korts

ASKER

There are no caching plugins.

I don't know how to open a "private" browser window. Please educate me.

Thanks
In Chrome, there's a "New incognito window" option in the menu (shortcut ctrl-shift-n)
In Firefox, there's a "New Private Window" option in the File menu (shortcut ctrl-shift-p)
Edge has a "New InPrivate Window" option too.

All of these load a page without accessing the browser cache, and don't store cached files, cookies or passwords etc once they've been closed.
Terry, great, I'll try it.
There's some notes on caching here: https://codex.wordpress.org/I_Make_Changes_and_Nothing_Happens

The private window technique avoids browser caching issues. It could be the case that you've got some Server-side Caching as described in the above link. You almost certainly haven't set up Cloudflare on a staging site, so it probably won't be that.
I have never heard of Cloudflare, but one thing I forgot & should have mentioned is the site is hosted at WPEngine.

I have found that to be a mixed bag, it MIGHT be connected with them.
Sounds like it might be... there's some notes about caching on the WPEngine site here: https://wpengine.com/support/cache/
SOLUTION
Avatar of Jason C. Levine
Jason C. Levine
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Are you trying to make an exact copy of live to stage?

If so you can try the WP All In One Migration tool https://en-za.wordpress.org/plugins/all-in-one-wp-migration/

In the Advanced option of the export disable the media and spam posts.
Create a snapshot and then use the same plugin on stage to import the snapshot.

This will migrate the urls and other site specific settings.

You can copy the media over by ftp.

I have found if media is included in the snapshot - firstly your snapshot is big and sometimes get reported as corrupted and secondly you run into the 512MB limit on the free version.
I am trying to merge the two without, if possible, effecting the live site until everything is good.

I need to maintain all the live site content entered since the staging site was created.

I know how to move the custom code, tables & pages to the live site.

My MAIN concern is the child theme, how do I create that & make it identical to the staging site WITHOUT disrupting the live site?

I'm thinking just create it, copy over functions.php, styles.css & header.php from the staging, then switch the live site theme to the child theme. If it looks good, THEN move the custom stuff. The custom stuff is only accessible visually from one doorway, add that LAST.

Does that sound reasonable? Issues with that plan?

Thanks
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'd go with Jason's comment
Julian,

I tried that. Everything looks pretty good, EXCEPT the site footer.

See attached. The image called "footer_child_live.jpg" is what the footer looks like in the child.

The image "footer_live.jpg" is what it's supposed to look like.

Note there are two differences:

(1) White background (instead of black) in child, different font colors.

(2) Extra stuff at the bottom in Child.

Ideas on how to fix this?

Rest of css, header, menus, etc all look good.

Thanks
footer_child_live.jpg
footer_live.jpg
I solved the footer issues, it is in the Theme Styling area (for the Enfold Theme).

So I think it has passed step 1, I'm asking the customer to look at it now.

Thanks
I have a maddening minor issue. The font color on buttons is a sort of gray, I think #808080.

It needs to be white.

I CANNOT figure out how to make that happen.

I recognize it's in the theme styling, but I can find no place to do that.

Help!!
If you have it in live right click the button and Inspect Element - check the styles tab to see where that style is being defined.

Then repeat the process on stage to see if either something is missing from stage OR something on stage is overwriting the style - that is where I would look.

Do you have links we can look at.
I figured it out. I added custom css to force button text #FFF

I think I have live now working in the child theme.

Next step, try to activate the custom stuff.

We shall see.

Thanks
Glad you got it working! Don't forget to close the question...
Twas a nightmare, but I think I got it all.

Looking pretty good, I asked customer to review with a fine tooth comb.

Richard