This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Transferring custom layout from the Layout Builder to another site

  • Creator
    Topic
  • #10156
    Johanna Heath
    Participant

    I’m Using the Layout Builder with Jumpstart.

    We first of all developed the website as a single site installation, but have tried to move it to a multi-site installation, by copying all the db tables. All fine, except that none of the Custom Layout content is present. All the names are there, but not the content of the Custom Layouts, and the template for all the affected posts has been reset to ‘default layout’

    Could you please advise how we make this transition successfully?

    Kind Regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #10159
    Jason Bobich
    Keymaster

    Hello,

    Remember that WordPress serializes complex data like this before saving it to the database. So, if you’re losing this data, it has something to do with how you’re handling your database tables.

    I think the easiest thing to do here would just be to uses WordPress’s import/export tool. On the first site, go to Tools > Export, select “Custom Layouts” and export to an XML file. Then you can import this over on the new site by going to Tools > Import > WordPress.

    #10170
    Johanna Heath
    Participant

    Hi Jason,

    I appreciate that, but doing the export / import has its own set of problems – I’ve tried it

    Back to this:
    Some of the custom layouts are actually OK, but others not. It appears that if it retained the custom layout setting for the page, then the custom layout is also OK

    Kind Regards,
    Johanna

    #10172
    Jason Bobich
    Keymaster

    Custom layout are a custom post type and the elements and settings are meta data saved to these posts by WordPress. If you’re doing a database transfer, you just have to do it in a way where you’re not messing with the serialized data. This is possibly a topic you may want to research a little more if you’re going to working directly with MySQL databases like this. Or, if it’s a sort of moot point, just take a few moments and set up the layouts again. I wouldn’t stress over it too much.

    #10592
    mizzinc
    Participant

    Hi Johanna.

    You might want to investigate using wp-migrate-db. (http://wordpress.org/plugins/wp-migrate-db/).

    Since you are moving to a multi-site that has it own set of problems if other sites are already set up. If its a fresh install this might be the right solution.

    #10596
    Johanna Heath
    Participant

    Thanks for the advice. I have transferred the database successfully now, but this looks like a useful one to add to the arsenal!

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.