Configuring Staging Site to Push Live

Avatar
  • updated
  • Answered

I recently created a staged site for my blog/website. Over the past week, on my staging site I did the following: 

-added a couple of pages

-put some custom css to a few existing pages 

-rearranged some widgets

-updated plugins

-updated WP


All looks fine on the staged site.  


Prior to pushing "Live" I obviously want to push these changes over, but I'd like to be sure I am not writing over all the posts & comments made by users this past week. I am not quite sure how to customize the "Push to Live" settings to make this happen, and would rather not try by trial and error.

Looks like:

Default Setting--overwrites all, so I WOULD lose all recent posts, comments, etc.

Customize Settings:

Files/Folders--Would this be all that's needed to push over all changes mentioned above?

Push Full Database -- Again, if selected looks like I would lose all recent user posts, etc.

Choose Changes in Table-- 12 selections are listed. I am unsure what if anything, selecting (or not) any of these items

   would have.

Does anyone have a good idea of WHAT and what not I should select to push live to incorporate the mentioned changes, while not losing recent posts/comments?


Thanks 


   

Avatar
IMH Support Agent 3
Quote from anthony185

Nope, no other changes to live site other than new posts and comments.

Below is the (15) configuration page selections when going to push a staged site live in Softaculous:

____________________________________________________________________________

                                                
Overwrite Files/Folders

Push Full Database
                
Choose Database Changes

Data Changes in Tables
wpfq_actionscheduler_actions
wpfq_actionscheduler_logs
wpfq_comments
wpfq_options
wpfq_postmeta
wpfq_posts
wpfq_term_relationships
wpfq_term_taxonomy
wpfq_totalsoft_poll_answers
wpfq_usermeta
wpfq_wpforms_tasks_meta
wpfq_wprss_logs

____________________________________________________________________________


Again, on my staged site I changed/edit:

--added a couple of new pages

-put some custom css to a few existing pages

-rearranged some widgets

-updated plugins

-updated WP

I want to push all those over changes over, but not overwrite any new posts or comments on the live site. 

I know I do not want to "Push Full Database"

Actually, I have 2 direct Questions, if you know--great, please answer. if you are unsure that's ok too--just tell me.

1. Will selecting ONLY "Overwite Files/Folders" push over all changes (as listed above) from staged site

     to live?

2. If not, which DB table items do I also need to select to push over to include all changes but main-

    tain all new user posts and comments on live site.

I DO have back-ups of everything--home directories and DB. If I do happen to overwrite the DB or whack something out I can "hopefully" recover, so it wouldn't (maybe) be the end of the world.

I would love to have a better understanding of the above questions though.so that we can confidently utilize site staging to experiment with our changes and updates etc before pushing live. 

                                                                                                                                                                                                                                                                      

First things first, I'd advise taking backups of the live site and the staging site, just in case you need to restore either one. The pages you added to the staging site are in the staging site database. There is no single best way to approach this kind of workflow, it depends on personal preference. Some people only do style changes in the staging site but don't add new content, this way they can migrate over the files only and not the database. In your case, first take backups, then consider doing a migration (files only) and building those new pages on the live site.

Avatar
anthony185
Quote from IMH Support Agent 2

If you are using Softaculous and the staging option there, then (as you indicated) you can choose how you want to update the existing database.  I mentioned earlier that you would need to keep the comments and the post tables unchanged since that is generally where your users (website viewers) will have their data recorded for comments or posts that have been made while you were working on your staging site.  I suggest backing up the Staging site AND the original site in case there is a problem when you push your Staging site live. 


If you are aware of any changes that are being made elsewhere on your WordPress site, then you would need to indicate where that may be and we can determine if another table in your WordPress database is affected. Uploads is a folder under the wp-contents folder for any files that a user may have uploaded.  You would want to keep the same folder structure as you see in the existing site.  So bascially, it's easiest to copy the Upload folder into the updated live site AFTER you have completed pushing the site live. 


In terms of the tables under WordPress, the table names may slightly differ depending on the prefix used for the WordPress install.  However, here's a list of the tables that you should be able to leave alone without affecting your existing changes in the Staging site (while preserving the current changes in the live site):

commentmeta

comments

postmeta

posts



If you have any further questions or comments, please let us know.


Kindest Regards,

Arnel C.

Nope, no other changes to live site other than new posts and comments.

Below is the (15) configuration page selections when going to push a staged site live in Softaculous:

____________________________________________________________________________

                                                
Overwrite Files/Folders

Push Full Database
                
Choose Database Changes

Data Changes in Tables
wpfq_actionscheduler_actions
wpfq_actionscheduler_logs
wpfq_comments
wpfq_options
wpfq_postmeta
wpfq_posts
wpfq_term_relationships
wpfq_term_taxonomy
wpfq_totalsoft_poll_answers
wpfq_usermeta
wpfq_wpforms_tasks_meta
wpfq_wprss_logs

____________________________________________________________________________


Again, on my staged site I changed/edit:

--added a couple of new pages

-put some custom css to a few existing pages

-rearranged some widgets

-updated plugins

-updated WP

I want to push all those over changes over, but not overwrite any new posts or comments on the live site. 

I know I do not want to "Push Full Database"

Actually, I have 2 direct Questions, if you know--great, please answer. if you are unsure that's ok too--just tell me.

1. Will selecting ONLY "Overwite Files/Folders" push over all changes (as listed above) from staged site

     to live?

2. If not, which DB table items do I also need to select to push over to include all changes but main-

    tain all new user posts and comments on live site.

I DO have back-ups of everything--home directories and DB. If I do happen to overwrite the DB or whack something out I can "hopefully" recover, so it wouldn't (maybe) be the end of the world.

I would love to have a better understanding of the above questions though.so that we can confidently utilize site staging to experiment with our changes and updates etc before pushing live. 

                                                                                                                                                                                                                                                                      

Avatar
IMH Support Agent 2
Quote from anthony185

Ohh..I was probably not real clear in my original post. 


inmotionhosting has like a 1 click "create staging site" feature.  I just discovered it myself through inmotionhosting's support site. 


From cpanel, you just go to Softaculous Apps installer (in Software Section) click on the "All installations" Icon in the upper right and then select "Create Staging" (WP install) of the domain you want to stage. That's all I did--1 click, there were no options


When going back to push that staged site live--that's when all those options (as listed in my original post) are given. 

I was hoping someone knew or had some 1st hand experience on what I should select & not select, to push those changes live (as listed in my original post) and not lose the "up do date" db currently on my live site.

 

If you are using Softaculous and the staging option there, then (as you indicated) you can choose how you want to update the existing database.  I mentioned earlier that you would need to keep the comments and the post tables unchanged since that is generally where your users (website viewers) will have their data recorded for comments or posts that have been made while you were working on your staging site.  I suggest backing up the Staging site AND the original site in case there is a problem when you push your Staging site live. 


If you are aware of any changes that are being made elsewhere on your WordPress site, then you would need to indicate where that may be and we can determine if another table in your WordPress database is affected. Uploads is a folder under the wp-contents folder for any files that a user may have uploaded.  You would want to keep the same folder structure as you see in the existing site.  So bascially, it's easiest to copy the Upload folder into the updated live site AFTER you have completed pushing the site live. 


In terms of the tables under WordPress, the table names may slightly differ depending on the prefix used for the WordPress install.  However, here's a list of the tables that you should be able to leave alone without affecting your existing changes in the Staging site (while preserving the current changes in the live site):

commentmeta

comments

postmeta

posts



If you have any further questions or comments, please let us know.


Kindest Regards,

Arnel C.

Avatar
anthony185
Quote from IMH Support Agent 2

Apologies, Anthony185,

There are a number of different ways to create staging sites and many simply override the database.  If you have an option to customize what you are overwriting when you push the site live, then you can use that option to prevent the newer posts from being overwritten. The comments and posts table are generally the ones you want to preserve.  You should make backups just in case the changes are not to your liking.


If you have any further questions or comments, please let us know.

Kindest Regards,

Arnel C.

Ohh..I was probably not real clear in my original post. 


inmotionhosting has like a 1 click "create staging site" feature.  I just discovered it myself through inmotionhosting's support site. 


From cpanel, you just go to Softaculous Apps installer (in Software Section) click on the "All installations" Icon in the upper right and then select "Create Staging" (WP install) of the domain you want to stage. That's all I did--1 click, there were no options


When going back to push that staged site live--that's when all those options (as listed in my original post) are given. 

I was hoping someone knew or had some 1st hand experience on what I should select & not select, to push those changes live (as listed in my original post) and not lose the "up do date" db currently on my live site.

 

Avatar
IMH Support Agent 2
Quote from anthony185

thanks for the quick response.

Hmm...that seems a bit odd though. On the push live config page, you are given 2 main options.  “default” which states your db will be overwritten, and then “customize” which allows you to pick & choose between like 15 different parameters as i mention in original post.


you’re saying that no matter what, you cannot push a staged site live without losing existing db? (Without paid plugins)

Apologies, Anthony185,

There are a number of different ways to create staging sites and many simply override the database.  If you have an option to customize what you are overwriting when you push the site live, then you can use that option to prevent the newer posts from being overwritten. The comments and posts table are generally the ones you want to preserve.  You should make backups just in case the changes are not to your liking.


If you have any further questions or comments, please let us know.

Kindest Regards,

Arnel C.

Avatar
anthony185
Quote from IMH Support Agent 2

Hello Anthony 185, 

Thanks for your question about pushing the staging site live and possibly overwriting existing posts.  A staged site has a separate database and WordPress is a "database-centric" application.  This means that your live site has ALL of the existing posts and changes made by users during the week, as you have indicated.  Pushing a staging site live will REPLACE that database and those changes will overwrite any posts made by your users for the past week.  

There are a number of plugins that allow you to merge the databases, or you can determine the tables and (and uploads) that were made in your old site.  Unfortunately, most of the plugins that can do this for you are not free (example: https://wordpress.org/plugins/wp-staging/).  If you were to do it manually, you would need to take the contents of the comments table and any file from your uploads folder and move them to your new site AFTER you pushed the staging site live.


I hope this helps to answer your question.  If you have any further questions or comments, please let us know.

Kindest Regards,

Arnel C.

thanks for the quick response.

Hmm...that seems a bit odd though. On the push live config page, you are given 2 main options.  “default” which states your db will be overwritten, and then “customize” which allows you to pick & choose between like 15 different parameters as i mention in original post.


you’re saying that no matter what, you cannot push a staged site live without losing existing db? (Without paid plugins)

Avatar
IMH Support Agent 2
  • Answered

Hello Anthony 185, 

Thanks for your question about pushing the staging site live and possibly overwriting existing posts.  A staged site has a separate database and WordPress is a "database-centric" application.  This means that your live site has ALL of the existing posts and changes made by users during the week, as you have indicated.  Pushing a staging site live will REPLACE that database and those changes will overwrite any posts made by your users for the past week.  

There are a number of plugins that allow you to merge the databases, or you can determine the tables and (and uploads) that were made in your old site.  Unfortunately, most of the plugins that can do this for you are not free (example: https://wordpress.org/plugins/wp-staging/).  If you were to do it manually, you would need to take the contents of the comments table and any file from your uploads folder and move them to your new site AFTER you pushed the staging site live.


I hope this helps to answer your question.  If you have any further questions or comments, please let us know.

Kindest Regards,

Arnel C.