• I have a WordPress site on my local development machine that’s essentially the same as the version that’s live in production. But, I’ve made a bunch of changes in dev to Twenty Twenty-Four styles such as changing the font selection, header sizes, padding/margins, line spacing, etc.

    What’s the easiest way to deploy just those changes from the development site to the live version (without manually re-applying them one at a time on the live site)? The plugins I’ve found for exporting don’t seem to do that.

    It looks like this information is stored in the wp_posts table where post_type='CustomStyles'. Could I copy the latest record’s post_content field from my dev environment & paste it into the equivalent record on the live site (say, via phpMyAdmin), or add a newer record, or is that just asking for trouble?

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator jordesign

    (@jordesign)

    Hi @ajwe – to be honest, what I would suggest is that if you install the Create Block Theme plugin – it will let you export out a copy of the theme (either as a child theme, or a new custom theme) which contains all those style and layout customizations.

    Thread Starter ajwe

    (@ajwe)

    Thanks @jordesign for your reply. Hmm, I just started playing around with this on the dev site to see what it does. One thing that worries me is their disclaimer about not using it on a production site (I don’t want to risk it mucking everything up if I push the copied theme live). But, also, do you know what would happen if TwentyTwentyFour has an update? Would that overwrite the styles in the exported theme? Or, if I exported the theme as a child or new theme, then managing things going forward seems like it becomes more complicated.

    Moderator jordesign

    (@jordesign)

    One thing that worries me is their disclaimer about not using it on a production site (I don’t want to risk it mucking everything up if I push the copied theme live).

    It’s fair to be cautious – that’s a good practice ?? In reality that plugin has been around a long time and is quite reliable. It’s also the case that it is only really used (in your case) for the act of exporting the child theme – so it’s not making any changes to the site or things you’d need to be concerned about otherwise.

    But, also, do you know what would happen if TwentyTwentyFour has an update? Would that overwrite the styles in the exported theme? Or, if I exported the theme as a child or new theme, then managing things going forward seems like it becomes more complicated.

    The good thing about child themes is that WordPress is pretty clever about it. When there’s a new version of Twenty Twenty Four, any of the customizations in the child theme are kept, and only the changes in Twenty Twenty Four that won’t overide customizations will take effect. So you get the best of both worlds ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Copying Styles from Dev to Production’ is closed to new replies.