2

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

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.

|improve this answer|||||
  • Thanks for your answer. I do have wp-cli installed but I never meddled with the database before so it's new territory for me. Does the database table for a page contain everything associated with it? Like images, ACF-fields etc? – Johan Dahl Nov 24 '16 at 12:49
  • 1
    act is probably in the post meta fields, so that's one table. Images will be stored as references so you'll have to physically move them and change the references. But that is what wp-cli.org/commands/search-replace is for. – jgraup Nov 24 '16 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.