Reuse/Export a Schema

6 posts by 4 authors in: Forums > CMS Builder
Last Post: August 17, 2011   (RSS)

Re: [dennisoneil] Reuse/Export a Schema

By zip222 - August 16, 2011

Yes, absolutely. I do this all the time. Just do the following:

1. Locate the schema folder (cmsAdmin/data/schema) on a site that has already been setup and make an offline backup of everything inside of this folder - consider these your "SCHEMA TEMPLATES"

2. When you go to setup a new site, just go through the normal preliminary installation process.

3. Once this is complete, upload all of your SCHEMA TEMPLATES into the schema folder on the new site.

4. Reset your permissions on these files as per the install instructions.

5. login to the CMS on the new site, and click on the Section Editors button. You will immediately see a bunch of notices at the top of the page indicating that the various sections have all been setup in the database.

That's it!

Re: [dennisoneil] Reuse/Export a Schema

By Dave - August 16, 2011

Hi Dennis,

Sure, with the latest version this is pretty easy. It's pretty much the same as doing a backup and restore, you'd just be restoring a default setup with all your best practices pre-configured.

To backup:
- Setup a default CMSB install exactly the way you want it, including sections, data, and private labeling
- Create a backup file under: Admin > General

To restore:
- Upload the /cmsAdmin/ folder to the new site
- Remove /cmsAdmin/data/isInstalled.php
- Run admin.php and fill out install screen
- Select "Restore Backup" instead of "Create Admin User" to restore default data

And that's it. There's a few other tricks for restoring individual sections, but the blanket approach above is the simplest and does everything. Let me know if that works for you or any other questions or "export/import" requirements and I'll try to assist.

Hope that helps!
Dave Edis - Senior Developer
interactivetools.com

Re: [zip222] Reuse/Export a Schema

By dennisoneil - August 16, 2011

Wow. That's great news.
I'm now ashamed I didn't look for a solution sooner.

Thanks zip222.

Re: [Dave] Reuse/Export a Schema

By dennisoneil - August 16, 2011

That's great. Thanks Dave.

Re: [zip222] Reuse/Export a Schema

By InHouse - August 17, 2011

I can confirm zip222's approach. We've done this for years. Makes setting up a new a snap. We've actually collected a raft of schemas into a single folder so we can pick and choose what we need for a new project.

Back in the "old days" most multi-page sections in CMSB came with the Hidden and auto-publishing fields present by defualt. This approach was primarily used to return us to that state.

Of course, I'm sure Dave's approach is not only accurate but better in all sorts of clever ways. ;-)

J.