Site redesigns take time, so many designers use a staging site or test site to get the new site ready without disturbing the live site. Moving your new design from staging to live without losing the new donations on the live site can be a challenge. This document walks you through how to prevent data loss when pushing your site live.
Before we jump in, it’s important to understand why this process is problematic. Because WordPress stores all your various types of posts with a shared sequential ID ordering, any new comments, pages, posts, or donations get new ID numbers. The process of migrating can mean that some IDs end up referencing the wrong post IDs.
For that reason, it is not recommended to migrate just your GiveWP donations or the GiveWP tables in your WordPress database.
Also keep in mind that data migration and site updates are not covered by our priority support. This documentation is provided only as reference material. Please consult a website professional if you are unsure of how to do any of this.
What to do if you have not yet started your redesign
If you have not yet started the redesign, and it can be performed relatively quickly, here’s a procedure to maintain data integrity:
- Place the live site in maintenance mode. There are many ways to do this, including free plugins on the WordPress Plugin Directory. Our Head of Support uses this snippet.
- Migrate the entire WordPress Database and files to your live staging environment.
- Make the changes/enhancements you want on the staging site.
- Migrate the entire WP database and files from staging back to your live production environment.
- Make a donation while in Test Mode to ensure the migration did not produce any problems with accepting donations.
- Do additional testing throughout your site to ensure all is well.
- Disable “Test Mode” in GiveWP and take your site out of Maintenance mode.
What to do if your staging site is already updated and you have new live donations on the live site
If your live staging site is already updated and ready to deploy then the process is a little more complex. Our suggestion is to use a local environment to help merge the staging database with your live database before deploying to live. Here’s what that might look like:
- Place the live site in Maintenance mode.
- Migrate all the data from the live site to a local environment. We suggest using either Duplicator or All-in-One WP Migration to do this.
- On your staging environment, export only the posts/pages/menus/etc that have changed using the built in WordPress exporter tools. This will download an XML file.
- Import those posts/pages/menus/etc to your local environment. Confirm all your pages, posts, menus look correct on local.
- Make sure the local environment is still in maintenance mode, and push the database and files from your local environment to your live environment.
- Test your live site extensively to ensure everything works well while still in maintenance mode.
- Disable GiveWP’s Test Mode and disable your live site’s maintenance mode.
Need More Assistance?
Even experienced WordPress website builders and designers can struggle with this process. If you need assistance in doing this well, we suggest contacting Codeable.io