Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-09-15 07:51:58

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

Working with live and development sites

I’m curious to know how people here work with their Textpattern websites.

When working with live and development sites what kind of routine do you follow? How do you keep them in sync? Which mySQL tables do you import / export to avoid overwriting data on the live site or loosing structural changes you’ve made on the development site? Do any of you take your website offline using a plugin such as rvm_maintenance when pushing changes to the live site?

And so on. As well as for my own benefit I’m very interested in this topic as I love reading about these kind of things.

Offline

#2 2011-09-15 21:38:51

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Working with live and development sites

This might be of interest.

Offline

#3 2011-09-16 07:52:49

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

Re: Working with live and development sites

That’s an interesting idea and I think adi_prefs could well become invaluable.

How do you work around the issue of both sites being updated at the same time though? For example I have a development site and a live site. The live site is constantly being updated with new articles, links, images and files and the articles will often cross reference these by their ID. Whereas the development site is being updated with new sections, pages, forms and CSS. If I was to do a complete database dump/restore as suggested in your link I’d end up overwriting the new content for one of my sites. Ideally I’d like a fairly painless way of merging the changes together so as to avoid any loss of data or tag errors.

Offline

#4 2011-09-16 11:57:19

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: Working with live and development sites

Algaris wrote:

How do you work around the issue of both sites being updated at the same time though?

I don’t! My local version is the master copy. Don’t know how you’d manage synchronisation of two separately modified databases.

Offline

#5 2011-09-16 12:29:02

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: Working with live and development sites

Algaris wrote:

Whereas the development site is being updated with new sections, pages, forms and CSS.

Sounds like you’re doing things here that don’t intersect with the live site changes. So you could easily export single db tables you’ve worked on and import them to the live site.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#6 2011-09-16 23:31:20

artagesw
Member
From: Seattle, WA
Registered: 2007-04-29
Posts: 227
Website

Re: Working with live and development sites

This is exactly the sort of problem that Escher’s branch feature solves – and which I hope to see adopted in Textpattern 5.

Offline

#7 2011-09-18 10:00:46

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

Re: Working with live and development sites

I’ll love you to bits if you could pull it off for Textpattern 5. At the moment it’s becoming something of a logistical nightmare trying to keep all my sites in sync.

When working on my Dev copy I have to tell myself, no I can’t upload that file otherwise it’ll have a different ID number to the live site and then article such and such which references this ID number will point to the wrong file. And then I find there’s no easy way to apply the changes in the Dev copy to the live site without messing with PHPmyAdmin and database tables and backup databases, all of which can get a little hairy.

And then unless I use adi_prefs I have to go through and change my file locations in the preferences tab before anyone notices.

One thing I found is that if I try to import certain tables into the database I get an error because of data duplication. But if I drop the tables and then import the new ones the website will be temporary broken for visitors. And if the import goes wrong I then have to drop everything and reimport my backup. Hopefully there will be an easier way to do this.

Last edited by Algaris (2011-09-18 10:06:00)

Offline

#8 2011-09-18 14:41:10

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

Re: Working with live and development sites

Thinking of Branch features what I’d love to have would be:

1) A Dev branch for me to work on. [Localhost]
2) A Staging branch to test and show my boss before going live. [Localhost]
3) A Live branch, which is what the public see. [Web Server]
4) A ‘Lab’ branch where I experiment with the code and make refinements that would probably break the other branches. [Localhost]

If all of these branches could be pushed to the others without having to look at PHPmyAdmin I’d be very happy.

Last edited by Algaris (2011-09-18 16:34:41)

Offline

#9 2011-09-20 00:47:40

JimJoe
Member
From: United States
Registered: 2010-01-30
Posts: 573
Website

Re: Working with live and development sites

I don’t either. I have only live sites.

Offline

#10 2011-09-20 08:44:22

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

Re: Working with live and development sites

I work directly on the live site (which can be risky) – I’d be all over a Textpattern solution that allows for dev, staging and live versions of a site.

Last edited by philwareham (2011-09-20 08:44:39)

Offline

#11 2011-09-20 08:49:04

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

Re: Working with live and development sites

I used to do that but having been burned in the past I try to avoid it for anything but very small tweaks. The main problem I find with the sites I work on these days is that the updates required are usually quite big and can’t easily be made to a live site in one go and in the meantime the live site is still being updated with content.

Last edited by Algaris (2011-09-20 08:50:36)

Offline

#12 2011-09-20 08:56:20

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,270
Website GitHub

Re: Working with live and development sites

I tend to work directly on live sites too, hiding things with judicial placement of HTML comments, or beavering away in a dedicated ‘wip’ Section which is hidden from the spiders.

The benefit is that the live articles can continue to be posted by the site owners and are automatically fed to the hidden section. The downside is that it requires discipline to remember to roll all the necessary page / style / form changes into the right places and sometimes requires a bit of rvm_maintenance time if it begins to go sideways or there are a lot of changes to make at once.

But hey, it keeps you sharp: live life on the edge :-)

(I do agree with Phil et al’s sentiments that a dev/staging approach would be a huge boon and probably a good USP for Textpattern over the competition — Escher notwithstanding of course)

Last edited by Bloke (2011-09-20 08:57:35)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

Board footer

Powered by FluxBB