- This topic has 5 replies, 3 voices, and was last updated 3 years, 2 months ago by Elvin.
-
AuthorPosts
-
February 16, 2021 at 1:23 pm #1660903William
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
February 17, 2021 at 9:25 am #1662051TomLead DeveloperLead DeveloperHi there,
It depends on what features you’ve been using.
For options in the Customizer, anything in the
wp_options
table that is prefixed withgenerate_
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 ๐
February 17, 2021 at 9:42 am #1662082WilliamAh 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?
February 17, 2021 at 7:15 pm #1662576ElvinStaffCustomer SupportTo 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/WnuB0ZGEAfter 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.
February 22, 2021 at 10:18 am #1668116WilliamThat makes sense to me! Thank you very much ๐
February 22, 2021 at 4:32 pm #1668473ElvinStaffCustomer SupportNo problem. ๐
-
AuthorPosts
- You must be logged in to reply to this topic.