Textpattern and Subversion

The only thing subversive about Textpattern is its ability to put the power of publishing into the hands of the masses, well at least those who can get around with UNIX, FTP, MySQL and maybe a little PHP.

Subversion allows you to download the latest development revisions from the Textpattern subversion repository. You can download the latest version of Subversion from SourceForge.

Install the latest revision of Textpattern

To install a clean version of the latest development revision, these are the instructions from Dean:

Open your favourite command line application, for example, Terminal in Mac OS X and change directory ( cd ) to wherever you want the site to be. For example, you could test your Textpattern install on your Apache Web Server in Mac OS X. You will need MySQL and PHP installed and running. To get your local hosting environment up and running, try following the basic instructions, I’ve used for installing from packaged binaries, or do it all in one step at MAMP.

Change directory to the root of the Apache Web Server

cd /Library/WebServer/Documents

Create a directory called “textpattern_svn”

mkdir textpattern_svn

Change directory ( cd ) to wherever you want the site to be, in this case, your new “textpattern_svn” directory

cd textpattern_svn

Checkout the code

svn co http://svn.textpattern.com/current/

Move the new code up and out of the download dir

mv current/* ./; mv current/.??* ./; rm -R current/;

Load the whereveritis.com/textpattern in a browser for further instructions

Now you have a Textpattern installation under version control. Whenever you want to update from the public repository, simply type:

svn update

in the same directory as the top-leve index.php and svn will integrate updates with your existing code. Whenever you do, type:

svn log

to see what changes/additions have been committed.

Dean mentions that, “It goes without saying that some plugins may break, but we’ve made quite a bit of effort to retro-accommodate them.”

Update to the latest revision of Textpattern

Change directory ( cd ) to wherever you have the /textpattern dir

cd /Library/WebServer/Documents/textpattern_svn

Get the old code out of the way

mv textpattern textpattern-old

Move aside your images directory temporarily

mv images images-old

checkout the new code

svn co http://svn.textpattern.com/current/

move the new code up and out of the download dir

mv current/* ./; mv current/.??* ./; rm -R current/;

retrieve your existing config file from the old textpattern dir

cp textpattern-old/config.php textpattern/config.php

restore your images directory

rm -R images; mv images-old images

Hold on to the textpattern-old directory for the time being in case you need to rollback. First things to do: go to Admin->prefs and set the real http-reachable address of the site (there’s no more of this URL and Path to Site nonsense) and visit the new Admin->diagnostics tab to see if anything needs an immediate fix.

comments | date posted posted Saturday July 16, 2005

The Builders Collective

The Builders Collective is about building community and building a repository of ideas, techniques and code for building a better world wide web.

Articles Archive > View Recent