07/10/2005: "Copying Greymatter for multiple blogs"
I talked about multiple blogs in Greymatter the other day and the fact that unless you are prepared to hack the code then native multiple blogs administered from the same interface is not currently possible in Greymatter. As I don't have time to investigate how to do this now - I will do in the future though - I had to resort to installing multiple copies of the Greymatter software on my site, one for each blog.
Before I started on this process I searched quite extensively on the GreyMatter Forums but did not find a definitive article on copying an existing Greymatter installation and reusing it. I know you can simply install again from scratch but I wanted to re-use an existing install as I knew that it worked, in this case my install from my Oracle Security blog. Anyway as I said I couldn't find a definitive guide to do this so I worked it out myself.
- First I created a new directory structure on my new site - the same as the structure on the old site. This doesn't need to be the case though. I added "archives", "entries", "cgi-bin" and "emoticons" directories to a base directory called "weblog"
- I then zipped up all of the files from the existing blog in each directory and copied them across to the new directories
- I then deleted all of the files in the archive directory
- I also deleted all files in the entries directory
- I then locally edited (copied it off the webserver to my PC) the gm-config.cgi file to change just the paths. I used the same directory structure on the new site so only the prefixes needed to be changed.
- I then copied a new gm-counter.cgi file from a new install to the cgi-bin directory. I could have just replaced every line in the existing file with "0" instead
- I also copied an empty gm-cplog.cgi file to the cgi-bin directory
- I also copied an empty gm-entrylist.cgi file to the cgi-bin directory
- Finally I copied a new gm-templates.cgi file from a new installation zip of 1.3.1. If I have wanted to retain the same style, menus etc from the old site I could have started with my existing template file. For now I went with a new one
- I next checked all the file permissions on the cgi-bin directory. gm-library.cgi to 644, gm.cgi, gm-upload.cgi, gm-karma.cgi and gm-comments.cgi to 755 and the rest to 666.
- The next step was to go to the site and run the gm.cgi script and follow the instructions to visit the configuration and review it. I did this and then ran diagnostics
- I then made some small changes to the templates
- It was then ready to make an entry to test it
I hope that this short list is useful to anyone else wanting to simply copy a Greymatter installation. If for any reason you want to simple "zero" an existing blog - i.e. delete all entries and start again the you can use the above list without the copying and chmodding.