Page 1 of 1

Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 9:56 am
by boonier
Hi

Can't seem to find any talk of this on the forum, perhaps I'm searching with the wrong terms, but...

What is the best way to synchronise my changes on a local MAMP dev site with the live version of it. I guess the main changes would be Template and CSS, and the appropriate database changes would be made on live..

Problem is, that both the templates and css are stored in the database in CMSMS. Any ideas/tricks that I'm missing?

many thanks
Si

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 12:17 pm
by staartmees
The best way is to export the database from the DEV-site and import in into the LIVE-site.

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 12:34 pm
by boonier
Hmm are there not going to be potential issues like differences in paths?

thanks

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 12:37 pm
by staartmees
Normally not; it's like moving from one server to another.

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 12:46 pm
by boonier
OK another scenario: say my client is adding content concurrently to me creating new styles on the dev site, if I upload export/import the database they'll lose all their content.. I can't ask them to stop working on their site whilst I do my bit!

In other dev environments, the CSS and Template files are separate to the database and can be synced (ftp or rsync) with the live server.

I know I can separate the CSS, but template files are another issue...

any other ideas?

thanks

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 12:51 pm
by staartmees
I don't think syncing between two databases is possible. So you have to manually add your changes tot the LIVE-site.

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 1:26 pm
by velden
staartmees wrote:The best way is to export the database from the DEV-site and import in into the LIVE-site.
Not a good idea under some circumstances:

for example:
webshop
formbuilder that saves into database
admin log will be overwritten
(frontend) user that changed their password
web statistic module(s)
etc.

And of course what boonier says.

Maybe you could do something with http://docs.cmsmadesimple.org/layout/ex ... r-template

Re: Syncronise Live and Dev site

Posted: Thu Apr 18, 2013 1:32 pm
by boonier
Or perhaps this is the simplest way:
http://www.i-do-this.com/blog/74/Template-Externalizer

I already use that module (its essential), but it didn't occur to me I could just synchronise the folders over ftp.

What do you think?

(IMO i think template externalizer should be added to CMSMS core)

thanks

Re: Syncronise Live and Dev site

Posted: Wed Apr 24, 2013 9:25 pm
by paulbaker
boonier wrote:Any ideas/tricks that I'm missing?
Good suggestions so far, but what about a different tack?

Just develop on the live site, saving a second version of the template. Then have a test page (not shown in menu) that uses this in-development template. You and client would know the URL to your test page, no one else would. Advantages are it's dead easy to change over to the new design when you're ready and the client can easily view your work by going to the hidden page.

Re: Syncronise Live and Dev site

Posted: Fri Apr 26, 2013 8:03 pm
by Dr.CSS
I make a new template by copying the existing one, copy style sheet or make a new one with just the changes you want and attach it to the new template as the last style sheet, then make a copy of the page it will be used on the most, not shown in menu, make all changes then switch pages to use it...

All on the same site no sync needed...