Having a staging environment for your WordPress site is a must these days
It’s a great place where you can build a new design, stage blog posts before they are approved and ready to go to the live site, etc. Something you might not think about, though, is how do you get the updates from the staging site to the live site?
Simply stated, it’s a very manual process. There are many ways this can be done, but they are all time intensive and prone to error.
The only situation in which it’s easy is when you can confirm the live site hasn’t had any additional blog posts (including edits), comments, pages (including edits), media assets, users, orders (if you’re site is an e-commerce store), no new forms or form entries, and no changes to your theme or configuration – since you copied the live site to the staging environment. If you can confirm nothing has changed on the live site, then it IS easy. You can simply replace the live site with the staging site – whether you were working on theme updates, blog posts, pages, etc.
In most cases, it isn’t that easy. Most sites will at least have some form entries from calls to action throughout the site. That’s not too hard to merge. If you’re using Gravity Forms, you can export the entries, copy the staging site to the live environment and import the entries back – the new entries will be there.
Most times, clients continue writing blog posts, maybe continue getting comments (though a lot of sites I work on now have comments off because they are mostly spam these days), they may edit content on a page or post. That makes it really hard to notice – because as you’re scanning the pages and posts, you see that title and it can be easy to skip over the Last Modified date.
In some cases, when we’ll build sites with custom fields, there’s not only the page, but also the metadata to that page (the custom field data) that need to make it to the live site.
Here’s a great third-party article on the very manual work that needs to be done to determine what’s changed, what you want to export, and import to the new site: https://premium.wpmudev.org/blog/moving-wordpress-site/
So what can you do to make it not so difficult?
- Keep track of all changes, and ask your clients to keep track of any changes they are doing – though, the larger your client, the harder it is for them to remember and report to you what they’ve done, so this isn’t the most reliable solution
- For particular pages and posts, we’ve had some success with WP All Import PRO with the ACF extension – http://www.wpallimport.com/
- For particular pages and posts, we’ve also had some success with Content Staging, and it usually brings over the ACF data and downloads the image(s) to the live site
- For themes – this can be tricky…sometimes you can bring over a theme, activate it, and everything will work well
- However, if your new theme has introduced custom fields or has new fields that you’ve taken the time to convert and populate pages/posts on the staging site, it’s not that easy to just copy the theme over and have it work…In this case, the best thing to do, we’ve found, is find out what’s changed on the live site – review the media, pages, posts, users, and forms sections in WP-Admin, and copy those to the staging site. When the numbers are matching up, you can pretty confidently say you’ve got everything you need. Then you can copy over the staging site, overwriting the live site, and enjoy your new theme! Typically we’ll just manually copy and paste and re-upload pictures to the staging site – yes, very manual, but as long as there’s not too many pages or posts, it’s not too much work.
NOTE: We are not representing or affiliated with any of the links on this page.