Site logo

Archived topic

Clone page via phpmyadmin

4 replies · Started by Svetoslav on January 31, 2019

Viewing posts 1–5 of 5

Hi guys,

I've setup a staging environment, where I built a few pages using sections. For a number of reasons, I can not overwrite my live site with the staging so I wanted to try and recreated the pages by using phpmyadmin and save some time. Here is what I did:

- went on live site and published a new page with "use sections" checked and 1 empty section. then closed the edit screen
- opened the postmeta "_generate_sections" from the page on the staging and copied the contents to the same meta field on the live site for the new page id.
- copied the "content" field from the "posts" table from the staging page to the live page
- tried to edit the page on live site again but no sections show up

I also ensured that any media links were updated in the array but still no go. What am I missing here?

Thanks in advance. It would be great if there is a way to do this

Thanks

Hi there,

For some reason, I don't think Sections can be copied like that, unfortunately. I think it has something to do with how they're serialized in the database.

I wonder if something like this would work?: https://wordpress.org/plugins/wp-exporter/

Thanks Tom, the plugin would definitely help. I'll keep digging and testing and will post back if I find something else.

I did a few tests and my approach worked for duplicating a page on the same site or moving that page to a completely new site.

This has narrowed down the issue of my mySQL environment between my live site and the staging.

Thanks again for you fast response.

No problem!

This archived topic is closed to new replies.