Copy Story to another instance
-
I tried to copy a story/all stories from one instance to another (using WP core export/import, also tried All Export/All Import). When I open “My Stories” I get the message: “Unable to Load Stories. There are stories with incomplete data.”
What is the best way to transfer/migrate stories to another instance?
-
Hi there, @mreichhart! Thanks for reaching out with your topic. This is a known limitation as WordPress file exports do not include all the required story data. However, you could explore other tools that could be used to install everything from a plugin to a full WordPress site such as, WP Migrate DB or WP-CLI. Note, we’ve been discussing some export possibilities in this issue as well. Feel free to subscribe to the issue for any updates. Thanks!
Hi @luckynasan, thank you for your reply. Can you please tell me which data exactly have to be copied to make a story work on an other instance? As I want to copy a story to a working instance I’m not going to migrate the whole instance or whole parts..
Thanks!Hi there, @mreichhart. It may be easiest to copy over the story manually at the moment while you follow the open issue above for any updates on this feature. Additionally, I will consult with the team regarding what specific data to import for stories and provide you with any updates.
Hi @luckynasan , anything new on that topic?
I noticed that after exporting/importing using All Export/All Import Plugin the preview works properly. Just the editor is showing a single blank page and the overview at “My Stories” throws the error: “Unable to load all stories because of imcomplete data”. So there must be some data stored somewhere – in a hidden, secret place 😉
-
This reply was modified 5 years, 2 months ago by
mreichhart.
Heya,
So all the Web Stories data is stored in a custom
web-storypost type, which WordPress uses thewp_postsandwp_postmetadatabase columns for.Now, if you use the standard XML export feature of WordPress, it will not export all of the data from these tables. Specifically, the
post_content_filteredcolumn used by Web Stories is missing.If you want to export individual stories, make sure that this column as well as all connected entries in the
wp_postmetatable are included.Again, the built-in export does not due this, but plugins like WP Migrate DB can help you with that. There are quite a few such plugins.
Hi there,
I wonder if you have any more insight or tips on what might be needed to import web stories from one instance to another via database. The scenario that I have right now is that I have a snapshot of a database that contains a number of stories that I’d like to pull into another live, running, instance.
To test one out, I copied the relevant row into
wp_postsand the relevant rows intowp_postmeta. I verified that theIDof the post itself was not present in the live DB, and I allowed thewp_postmetaimport to reassign primary keys as needed (while keeping thepost_id,meta_key, andmeta_valuefields intact).This kinda worked. I previously had 2 webstories, and after copying the data in this way it my “My Stories” dashboard did update to say that I had 3 stories… but it still showed only 2 story cards (verified by looking at the HTML).
If I click instead to Stories -> All Stories I do see my copied story listed (with proper author, title, published date). If I click “View” to view the story at its permalink it actually does work (including text, animation, imagery, etc.). However, if I click to “edit” the story, I see the story editor but each page is blank – I just get a white card, without any of the imagery/text that appears when I view the permalink.
It feels like there may be some sort of cached/compiled JS or CSS content that might just need to be regenerated to allow the editor and “My Stories” view to “notice” the updated story, since it seems fully functional at the permalink.
Is there some additional step I might need to take to get it to work completely? Some other crucial bit of information that I need to move over? I’m comfortable manipulating database content, so any general pointers of what I might have missed would be super helpful.
Thanks!
-
This reply was modified 5 years, 1 month ago by
agathongroup.
Actually, I may have answered my own question. It looks like I happened to choose a story in the old database whose
post_content_filteredcolumn contained corrupted JSON–it was not escaped properly, and so (presumably) the JSON parsing failed. I’m going to guess this was a problem with this particular story on the old site, as well.I pulled in a different story that did *not* have this formatting issue, and it seems to have come over cleanly.
Thanks for keeping things self-contained in these two tables! It makes this particular task much more straightforward.
-
This reply was modified 5 years, 2 months ago by
The topic ‘Copy Story to another instance’ is closed to new replies.