Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Support multiple sites (r3189)
I have a site running 4.0.8. How easy is it upgrade to the muti-site support and is actually recommended for a commercial project? As in, is it reasonably stable?
Offline
Re: Support multiple sites (r3189)
It seems very reasonably stable from my experience, but the recommended method requires httpd.conf access, which isn’t possible on most shared hosting providers. With my host, I was able to work around this using symlinks, but I’m not yet ready to deploy this for client projects. The support folks at my host strongly advised against changing the site’s document root.
It’s not so complicated to set up the alternate admin subdomain recommended by the README, and this doesn’t require changing the document root or changing your httpd.conf file.
Offline
Re: Support multiple sites (r3189)
OK, how do I go about upgrading from 4.0.8 without loosing the content? (How do I tell textpattern to move everything into one site, so that I can create another one?) Does the upgrade process move the required files?
Offline
Re: Support multiple sites (r3189)
Does the upgrade process move the required files?
No— it’s designed to keep your existing setup, and multi-site capability is currently for the alpha nerds— a group from which I had to resign after attempting this myself. I didn’t post my step-by-step instructions because so much depends on the capabilities of and familiarity with your server environment. I’m pretty good with the latter, but the former prevented me from going further for the time being.
I would caution you against seriously altering your site structure until you have made several experiments and been around the bend of all that could possibly go wrong. Here’s what I would do in your case:
Since you are dealing with a live commercial project, I would strongly recommend doing a test-run first, using a completely fresh Textpattern installation located somewhere where it will not interfere with your existing site.
- Establish your test directory somewhere on your server.
- Get a copy of Textpattern’s development version or 4.2.0 release candidate, and upload the files to your test directory.
- Follow Sam’s setup instructions exactly, to create a test site. If you run into difficulties, make detailed notes and record any work-arrounds that are needed in your hosting environment. This may require simply accessing your server’s admin panel, or contacting your hosting provider for support.
If it all works, you will have a working test site using Textpattern’s multi-site feature, and you can transfer your knowledge to the commercial site.
- Wait until 4.2.0 comes out as a stable release.
- Back up your database and files.
- Upgrade your Textpattern installation as normal.
- Check to see if everything is working.
- If everything is working under 4.2.0, back up your database and files before trying any monkey-business with the sites directory or changing your server configurations.
- Follow the methods you used to set up the test site, including any alternative workarounds you discovered.
- Set up your document root for each domain and subdomain on your server.
- Copy the
site1directory undersites, and rename it to identify the site. - Move all your site-specific files from your site’s document root to the new site’s
publicdirectory, with attention to the different needs of this directory according to the sites README file. - Move your config.php to the site’s
privatedirectory. - Change the relevant file paths in Textpattern and config, where needed, if applicable according to the sites README file.
- Log in to Textpattern from your new admin subdomain— make sure everything works.
- Check the site at yourdomain.tld— make sure everything works.
As I said before, when I went through this, it proved to be too advanced for my hosting setup. Your mileage may vary. I hope others on this thread will add commentary and corrections on the steps above where needed.
There’s really no substitute for reading the instructions carefully and experimenting with your hosting setup.
Last edited by johnstephens (2009-08-24 15:52:55)
Offline
Re: Support multiple sites (r3189)
OK, I created a testserver and have the development version running. Seems to work fine up to now. The question is how to I import all the content from 4.0.7 in order to test whether it truly works? Is there an export articles/forms/plugins feature that I am now aware off?
Edit: Oh, and is it possible to label the different admin sites somehow… As in put some text next to the Textpattern Logo at the top of the admin area? I tend to look at the URL myself, but I am not to sure that clients will…
Last edited by dl33 (2009-08-25 17:58:58)
Offline
Re: Support multiple sites (r3189)
dl33 wrote:
OK, I created a testserver and have the development version running. Seems to work fine up to now. The question is how to I import all the content from 4.0.7 in order to test whether it truly works? Is there an export articles/forms/plugins feature that I am now aware off?
The easiest as always is a MySQL dumb. Tho, easier would be to dublicate your database and after that run the update script which will adjust the database structure without fuzz.
Last edited by Gocom (2009-08-25 18:04:43)
Offline
Re: Support multiple sites (r3189)
Thanks for the reply Gocom. The problem is that I am trying to move from a single site installation (4.0.8) to a multi-site version (4.2), so a simple upgrade wouldn’t work as it keeps everything in the same format… Or not?
Offline
Re: Support multiple sites (r3189)
The database schema is no different for multi-site. You can use sql dump as usual to copy/transfer your site.
Offline
Re: Support multiple sites (r3189)
I have a use-case scenario:
Let’s say I’m hosting at joyent. I have all kinds of virtual domains like this. /user/home/myAccount/domains/mydomain.com/web/public/
Now I currently store a bunch of shared stuff in: /user/home/myAccount/globals/ so I’m wondering whether I could just store a global Textpattern codebase there, say user/home/myAccount/globals/textpattern/ and point all my Textpatternish domains at that.
Would there be any performance hit/advantage from sharing the codebase like that? Any other concerns?
Offline
Re: Support multiple sites (r3189)
mrdale wrote:
I have a use-case scenario:
Let’s say I’m hosting at joyent. I have all kinds of virtual domains like this.
/user/home/myAccount/domains/mydomain.com/web/public/Now I currently store a bunch of shared stuff in:
/user/home/myAccount/globals/so I’m wondering whether I could just store a global Textpattern codebase there, sayuser/home/myAccount/globals/textpattern/and point all my Textpatternish domains at that.Would there be any performance hit/advantage from sharing the codebase like that? Any other concerns?
I would expect no difference in terms of performance. The only exception would be if you were using a PHP accelerator. In that case, the accelerator would have fewer files to cache and therefore use less of your allocated RAM with a single shared code base.
Offline
Re: Support multiple sites (r3189)
Thanks mrSeatown
And each install would have their own environment, preferences, etc… because their databases are all separate. You just have to make sure that you run a vanilla install or all your sites are OK to be hacked in the same manner.
Offline
Re: Support multiple sites (r3189)
I’d be interested to hear how you set up multi site hosting on Joyent, am about to attempt this.
Offline
Re: Support multiple sites (r3189)
mrdale wrote:
Thanks mrSeatown
And each install would have their own environment, preferences, etc… because their databases are all separate.
Yep. Each site has its own database and config.php file. Only the core code is shared.
In theory, you could also set up a shared plugin cache directory if you want to share plugins across sites. But have not tried this yet myself.
Offline
Re: Support multiple sites (r3189)
jstubbs wrote:
I’d be interested to hear how you set up multi site hosting on Joyent, am about to attempt this.
See here.
Offline