Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-09-20 09:25:41

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: Working with live and development sites

Interesting. I had no idea how many of you work with live sites. I just assumed that most would work with a local copy and then merge the changes.

Offline

#14 2011-09-20 09:30:28

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: Working with live and development sites

Algaris wrote:

Interesting. I had no idea how many of you work with live sites. I just assumed that most would work with a local copy and then merge the changes.

I tried that a few times, but attempting merging the SQL data cleanly proved a lot more problematic to me than simply ‘winging it’ and working directly on the live site.

Offline

#15 2011-09-20 10:14:03

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: Working with live and development sites

The only clean way I’ve found is to drop the live sites database, import the development copy and then change my Textpattern paths at lightning quick speed and hope nobody noticed. I wouldn’t even dare trying this on a corporate or e-commerce site. So far I’ve been able to keep the sites in pretty good sync. Problems will occur when I have longer term structural changes to make while the live site is being updated. But at least with a local copy I can experiment with merging the live sites data into it.

One of the many reasons I work locally and then upload to the live site is that I use cnk_versioning so I can work in my text editor of choice (Espresso). I really don’t want to have the live site set to Testing all the time in order for the plugin to do its magic.

Last edited by Algaris (2011-09-20 11:30:18)

Offline

#16 2011-09-20 11:11:52

RedFox
Member
From: Netherlands
Registered: 2005-03-25
Posts: 805
Website

Re: Working with live and development sites

Sometimes I make a dev section with page and template structure (live site) so I can experiment without to much risk with HTML/Javascript/CSS/articles/etc. This section is a standalone part of the site … with it’s own url so only invited people are welcome. You can even lock the landing page if you wish. And … don’t forget to block Google … ;-)

[edit]
Oops … just saw Bloke’s post and others … :|

Last edited by RedFox (2011-09-20 11:22:18)

Offline

#17 2011-09-20 14:57:54

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Working with live and development sites

I’ve been toying with the idea of creating an XML-RPC client plugin which would allow moving pieces between different TXP installations. The problem is that the use of auto-increment IDs everywhere makes that tricky because the IDs might not match across the environments.

I’ve thought of maybe changing the tables on the higher level environment sites to not auto-increment, but that would force a workflow of no work on live (which could be a good thing). Haven’t looked into other ways of dealing with this in MySQL otherwise.

Wasn’t sure if there was any interest in this so I haven’t been super pursuing it, but I started thinking about it as a way to have clients stage content updates to existing copy.


Shoving is the answer – pusher robot

Offline

#18 2011-09-25 09:33:43

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

Re: Working with live and development sites

Hello Txp People(s)

We currently have a production setup as follows:

  1. A production instance
  2. A test instance

We do development on the test instance (yes: perhaps we should rename that. Hmm). We’ve run into a problem whereby our existing migration process, copying the DB + files, would end up overwriting data on the production instance (e.g: it’d delete it because it is never copied back to test).

An example would be: We post up new blog entries on production, but these don’t come across to test. We don’t want to use a “copy” process to update test from production, as it’ll overwrite existing new/modified development on the test instance (e.g: forms held inside the DB).

In our case it is only blog articles that are effected. We’ve been considering just putting a trigger onto the DB to inserts rows into the test instance textpattern table as they are inserted into the production instance (the DB schemas are on the same server).

Is this stupendously stupid? In your experience, have you come across this and found a better way? As long as MySQL auto-inc columns play ball with the trigger (I’ve not tried it yet) I’m presuming that we’ll be able to then simple overwrite the production instance with the test instance (along with any changed forms, css or js files, images etc).

I figured it’d be smart to first ask if anyone has tried this kind of thing before in a txp context and if it really just asking for trouble.

Thanks in advance,
Giuseppe

(I merged the new topic started by caruso_g with this existing topic, trying to keep all info on the subject together. Hope it doesn’t get too confusing. -Els)

Last edited by els (2011-09-25 23:14:24)

Offline

#19 2011-09-25 12:15:12

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 535

Re: Working with live and development sites

That’s an interesting idea hakjoon. If the mechanism for moving content between the installations was fairly easy/seamless it could be what I’m looking for, till something is baked into TXP5 ;-)

The only drawback I can think of is it would make updating the site I work on impossible when out of the office.

Offline

#20 2011-09-25 19:34:54

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: Working with live and development sites

Hi Giuseppe, have you seen this recent thread? Maybe it helps, it’s more or less about the same issues.

Edit: topics merged.

Last edited by els (2011-09-25 23:15:27)

Offline

#21 2011-09-25 22:04:59

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

Re: Working with live and development sites

Els wrote:

Hi Giuseppe, have you seen this recent thread? Maybe it helps, it’s more or less about the same issues.

Hi Els, thanks so much for the link, I didn’t see it.

More or less, it is the same issue. We are really trying to find a solution since working on live sites it’s not a viable way on more complex site in any case.

Currently, we are testing a possible solution considering that the only content created in Production are blog articles.
We created a MySql trigger function to mirror articles created in Production to Development. Then we created a script to migrate Development to Production when ready.
We are also considering to use cnk_versioning to manage structure so that we’ll just move its folder structure from Development to Production after we tested edits to migrate.

What do you think about it?
Do you think cnk_versioning could help in keeping structure more separated from content1?
Which TXP content/folders can be centralized to ease migrations? Images folder? Css folder?
Could a multi-site installation help in any way?

Thank a lot as always for your help, it is much appreciated. :)

1 btw, keeping all in texpattern table doesn’t help…

Edit:
Added MySql trigger functions reference link

Last edited by caruso_g (2011-09-25 22:11:17)

Offline

#22 2011-09-25 22:10:03

caruso_g
Member
From: Catania
Registered: 2009-04-11
Posts: 88
Website

Re: Working with live and development sites

Hi, I am sorry, I didn’t see this post and I opened a new thread in “How do I…?” section.
Please, take a look at it , I hope that can help.

(Topics were merged. -Els)

Last edited by els (2011-09-25 23:17:20)

Offline

#23 2011-09-26 01:49:07

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: Working with live and development sites

Algaris wrote:
The only drawback I can think of is it would make updating the site I work on impossible when out of the office.

Yeah the ideal situation would be to be able to move things between any installation that way you could work on live if needed and migrate the stuff back, or work on test or dev. It only really gets tricky when using ids to reference content like images, files or specifying articles by id. It would be nice to move to guids or something to alleviate that but that brings it’s own issues.

Still trying to think through it to see what can be done. I’ve worked with stuff like this before but we always targeted multiple environments from the get go so the DB was setup to handle that.


Shoving is the answer – pusher robot

Offline

#24 2011-09-26 19:33:30

scornflake
New Member
Registered: 2011-04-28
Posts: 4

Re: Working with live and development sites

hakjoon – I’m curious. What issues do you foresee moving to a guid (or simply synthetic ID) based approach?

.

Offline

Board footer

Powered by FluxBB