• bipedalrabbit

    (@bipedalrabbit)


    Hi all.

    I am making my first site and it’s not live yet. I’ve been making it staging. I’ve googled and asked ChatGPT and the more I read, the more confused I’m getting, so I would appreciate any help from those with more experience.

    I understand it’s still a good idea to have a child theme in addition to staging. Should I have a child theme for the staging site and also the live site? Does it make sense to do that?

    Since everything is currently in staging, what steps should I follow to transfer it to a child theme and what should the workflow be after that when I want to update the site?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • I understand it’s still a good idea to have a child theme in addition to staging.

    Where are you getting this understanding from?

    You only need a child theme if you need to make substantial code changes to your chosen theme. This is because, should you make the code changes in the main theme, you’d lose all the changes when the theme is updated.

    These days most themes come with extensive customization options, making it less likely to need a child theme to store customizations via code.

    So, per the above, are you certain you actually need a child theme?

    Thread Starter bipedalrabbit

    (@bipedalrabbit)

    Hey George,

    I was prompted to make some updates and I wanted to change my theme (which I ended up doing). I wanted to first make sure that I don’t lose any information and so I back up the site and also Googled a bit about child themes. Then I asked ChatGPT; the discussion follows.

    Best Practice:

    Always develop, test, and make changes in the staging environment first. Once everything is finalized and working as expected, push those changes (including the child theme) to the live site. This ensures a smooth and stable update process.

    You said:

    should i have a child theme in the staging site and also one for the live site?

    ChatGPT said:

    Yes, it’s recommended to have a child theme in both your staging and live sites, but with a specific workflow that ensures consistency and stability. Here’s how this works:1. Why Have a Child Theme in Both Staging and Live Sites?

    • Staging Child Theme:
      • This is where you make changes, customizations, and updates safely without affecting your live site.
      • You can test new features, design adjustments, and plugin integrations (like WooCommerce) before pushing them live.
      • It’s your development and testing environment, allowing you to experiment and troubleshoot.
    • Live Site Child Theme:
      • This is the stable version of your child theme, containing only fully tested and finalized changes.
      • It’s what your visitors interact with, so it should be free from any bugs or unfinished code.
      • The live child theme is updated only when you’re ready to deploy changes that have been thoroughly tested in staging.

    2. How to Maintain Both Child Themes Effectively:

    1. Create a Child Theme in Staging:
      • Set up your child theme in the staging environment, where you do all your development work.
    2. Develop and Test in Staging:
      • Make your customizations, add features, and thoroughly test everything.
      • Ensure that the child theme works well with WooCommerce, other plugins, and your site’s content.
    3. Push the Child Theme to Production:
      • Once everything is finalized in staging, copy the child theme (along with any associated settings and content) to your live site.
      • You can do this manually (via FTP) or use a migration tool.
    4. Keep Versions Consistent:
      • Ensure the child theme in staging and live sites remain in sync. When changes are made and tested in staging, the same changes should be pushed to the live child theme.
      • Use version control (e.g., Git) if possible to track changes between the staging and live child themes.

    3. Best Practices:

    • Develop in Staging, Deploy to Live: Always make changes in the staging child theme first. Only update the live child theme when you’re ready to push finalized changes.
    • Backup Before Deploying: Before updating the live child theme, back up your live site and database to avoid losing any data.
    • Test After Deploying: After pushing the updated child theme to the live site, perform a final round of testing to ensure everything works as expected in the live environment.

    Conclusion:

    Yes, you should have a child theme in both your staging and live sites. The staging child theme is for development and testing, while the live child theme is for stable, finalized changes. This approach helps maintain a smooth, risk-free workflow from staging to production.

    Am I right to be confused by ChatGPT’s response?

    I thought I would have to make some code changes (see my previous post) but I ended up switching from Ollie to OceanWP, which resolved the problem I was having.

    As for whether I’m sure I need a child theme — no, I’m quite unsure that I need it, and especially so after getting a proper human opinion! Thank you for your insight.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.