0

We have a WordPress based News Website... A few months back we started customizing the website (some changes in the Post and page layout and look) on a copy/Staging Website and also kept adding new News/Posts, Pages on Old Original Website. On Old website, we have thousands of posts and pages grown up with the passage of time.

Now, when we are planning to make the website live, we want to have (Keep) these posts, but obviously if we will replace/deploy from the Staging to Live we will loose these posts as on Staging we never added New Posts. Writing/Adding these posts and pages on the newly migrated website will be a trouble, so how we can handle this situation where we do not loose our Pages and Posts. Away can be to use the Plugins like WP Exporter but don't it affect the Layout of the Pages and Posts as we have also done some customizations on the Pages/Posts on Staging Website. Please advise with the most efficient solution. Thanks in advance!

0

If your data diverged at one site (old site receiving new content) and your code diverged on another (staging site in development) then you don't really have a conflict here. You can just update live site with new code, assuming things are reasonably compatible.

In general WP is not friendly to bi–directional move of content. Usually workflows presume that content only ever moves in one direction (production to development, staging to production) and never in reverse. That saves one from a lot of trouble.

0

A few months back we started customizing the website (some changes in the Post and page layout and look) on a copy/Staging Website and also kept adding new News/Posts, Pages on Old Original Website. On Old website, we have thousands of posts and pages grown up with the passage of time.

There should be a clear separation of the layout and the content in WordPress.

If you could just export only the posts, terms, comments and attachments ( probably also authors) to a single file and import it to the other WordPress website.

You have at least two options as I know that don't use plugins.

WP CLI wiht the reasonable simple syntax:

# Export posts by IDs
$ wp export --dir=/tmp/ --post__in=123,124,125

The other way would be from the WordPress dashboard Tools -> Export.

enter image description here

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.