I’m doing a major rework of an existing homepage in my dev environment. There are some new pages but also lots of changes to existing pages. How can I best transfer these changes to my live environment? Exporting and importing only works for pages that does not already exists, it seems.

I would like to export chosen content and overwrite existing content if it exists. I’m not in a position to just migrate the entire site since the live site is an active site with lot’s of daily updates on some parts.

1 Answer
1

You have a narrow selection to choose from. Either replace the database tables with something like wp-cli or have a special import-export process for your data.

If you want to make this granular, you could make a post metabox to import/export post content and metadata as json. Then updates could be incremental and on the fly.

But if you develop locally on a different database, then you run the risk of your post IDs being out of sync. So keep that in mind during import/export in any way you choose.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *