Nov 20, 2008, 06:23 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Search via SMF or Google: modx forums all of modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1]   Go Down
  Print  
Author Topic: How to use an SQL script to jump start your MODx site  (Read 1222 times)
0 Members and 1 Guest are viewing this topic.
devtrench
Jr. Member
*
Posts: 49



WWW
« on: Sep 13, 2007, 04:56 PM »

 Cool I'm posting this in 'In Development' because the SQL script I'm posting is not for newbies, and it is in development.  To automate the process of starting a new MODx site, I maintain a little database of the basic data I need for a new MODx site.  This includes content, templates, chunks, snippets, template vars, users, roles, and categories.  When I start a new MODx site, I export the data and import it using phpMyAdmin.  This way, all of my basic templates, chunks, snippets, etc, are all set up and ready to use.  Automating these basic processes saves me about 3 hours of work on each new site. 

I'm still in the process of refining the script/DB and it's built around the way I like things, but I've had thoughts of maybe turning this into a module (right, like I have the time for that!). 

I'd be interested to hear if anyone else does this or does it better, or in a different way.

Attached to the post is a file with data only, and another one of data+structure.  I use this with modx 0.9.5, and am not sure if it works with 0.9.6, but it might.

I've written more about this on my blog at: http://www.devtrench.com/auto-site-start-modx-resource-install-script/

Thanks,

James

* auto-site-start.0.2-beta.sql (29.57 KB - downloaded 86 times.)
* auto-site-start.0.2-beta-plus-structure.sql (42.58 KB - downloaded 81 times.)
Logged

dev_cw
Testers
*
Posts: 2,692



WWW
« Reply #1 on: Sep 13, 2007, 05:09 PM »

Thats a good idea.
Logged

Shane Sponagle | Snippet Call Anatomy | Document Specific Variables

Something is happening here, but you don't know what it is.
Do you, Mr. Jones?  -  [bob dylan]
smashingred
Marketing & Design Team
*
Posts: 1,112


HTML, CSS, Marketing, Design, and more...


WWW
« Reply #2 on: Sep 13, 2007, 09:36 PM »

James,

I looked at your sql and your blog post and while I don't think I wan't your styles in all my sites I think it makes immense sense for anyone who has certain design patterns to do as you did and do a MySQL Dump to use as a basis for speeding up production. It might be better if there were a faster way to do this but I think I may create a raw template with all my favourite stuff and such and use the dump on new sites.

This may also warrant a Wiki Post to save time on development.

All the best,

Jay
Logged

Jay Gilmore
SmashingRed Web & Marketing
Follow me on Twitter
Configs
Local: MAMP 1.7.2 Mac OS 10.5, Apache 2.0.59, PHP 5.2.6, MySQL 5.0.41
Remote: Linux, Apache 1.3.41, PHP 5.2.5, MySQL 5.0.51a-community
MODx For Newbies
About MODx (read For Optimal Results)
Installation and Configuration
Beginners Guide to MODx
About MODx and More
What's Coming Next
Just because it's possible to build a dropdown menu doesn't mean you should.
devtrench
Jr. Member
*
Posts: 49



WWW
« Reply #3 on: Sep 13, 2007, 10:07 PM »

I looked at your sql and your blog post and while I don't think I wan't your styles in all my sites
 

That's actually the reason why this isn't a module yet.  I figured that this particular SQL is too tailored to how I set up my sites, and I have trouble thinking about how to make it more generic.  So it's probably just a good exercise in what you can do to help speed up your own development.

This may also warrant a Wiki Post to save time on development.


That's a good idea, I just might do that Smiley

Thanks for the comments!

James


Logged

rthrash
Foundation
*
Posts: 9,511



WWW
« Reply #4 on: Sep 17, 2007, 12:27 PM »

Maybe you might look at what ScottyD did with the installation wizard and collaborate with him on it.
Logged

MODx is a framework that allows web professionals to turn over sites to end-users for daily maintenance without worrying. Community participation and questions are encouraged, especially when you help us help you, read the wiki, and review snippet parameters – even if you have to look at the source. Searching the forums helps, too.
Ryan Thrash
MODx Co-Founder
Principal @ Collabpad
work productively.
work intelligently.
work together.
Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!