[Resolved] Working with GeneratePress in Cloudways Staging Enviroment

Home Forums Support [Resolved] Working with GeneratePress in Cloudways Staging Enviroment

Home Forums Support Working with GeneratePress in Cloudways Staging Enviroment

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1660903
    William

    Hi there,

    I am very close to having my GeneratePress theme go live on my site (woohoo) – my next step is to use staging on my Cloudways server, so that my writers can continue writing on the live site, but I can implement the theme on the staged site, and push the changes for just the theme to the live site (not overwriting any content the writers are producing on the live site).

    Pushing Web Application Files does not seem to be enough – do you know what databases are needed to be pushed to the live site when working in a staging environment, to push ALL changes from a GeneratePress theme, including snippets and ACF custom shortcodes?

    This would really help me out. Otherwise, I’ll have to pause all work on my live site for a few weeks etc.

    Kind regards,

    Will

    #1662051
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    It depends on what features you’ve been using.

    For options in the Customizer, anything in the wp_options table that is prefixed with generate_ would want to get moved over.

    For Elements, they’re all stored in the wp_posts table with your content, as they’re treated as a post type.

    If you mean the Code Snippets plugin – they likely have their own area in the database, I’m not aware of what it’s called/where it’s located, unfortunately. Their support should be able to help you there.

    Let me know if you need more info ๐Ÿ™‚

    #1662082
    William

    Ah okay Tom, thanks for the response. Since Elements are stored in wp_posts, I presume that means I can’t have a staging environment, implement the theme, and push it back to the live site, and not expect the content writers are writing on the live site (during the development time) to be removed?

    The only workable solution is to pause all work on the site and stage the whole site, freezing the site from any future work during such migration?

    #1662576
    Elvin
    Staff
    Customer Support

    To add to Tom’s answer, if you’re using Code Snippets plugin, it’s table on the database is called wp_snippets. You should include that as well if you’re using the plugin.

    If you’re using a child theme’s functions.php for your snippets then you don’t need to bother with this as your snippets are baked into the file.

    I presume that means I canโ€™t have a staging environment, implement the theme, and push it back to the live site, and not expect the content writers are writing on the live site (during the development time) to be removed?

    We’re not exactly sure how cloudways staging and live environment database tools work.

    But from personal experience, if it’s like Pantheon’s DEV|TEST|LIVE database clone and/or import tool, then the database is overwritten rather than merged. That means the newer contents on the live site may be wiped if you import the staging site’s database to the live just as you worried.

    If this is the case, then you can either re-do what you did to the staging site to the live site so you know exactly what you’re changing or try my personal solution:

    After I’m all done with the staging site and is ready to import it to the live site here’s what I do:

    I temporarily put the Live on maintenance so no work is done. So yeah, you pretty much have to pause all work but this should be quick enough to do.

    I export all contents of the Live site through WordPress’s Dashboard > Tools > Export as shown here:
    https://share.getcloudapp.com/WnuB0ZGE

    After exporting the xml file, I import it to my dev/staging site. I then check and confirm if the latest contents from the live site were actually added back to the staging site. This act basically merges the content database of live and staging.

    After confirming everything, I just clone the staging site back to the live site.

    A wise man once said:
    "Have you cleared your cache?"

    #1668116
    William

    That makes sense to me! Thank you very much ๐Ÿ™‚

    #1668473
    Elvin
    Staff
    Customer Support

    No problem. ๐Ÿ™‚

    A wise man once said:
    "Have you cleared your cache?"

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