I have been running localhosted websites on my Ubuntu setup for years.
I don’t understand:
using the per-directory (not per-domain) method.
The only sense I can make of this is that you want your various websites to be accessed as:
http://localhost/site1
http://localhost/site2
http://localhost/phpmyadmin
etc.
And have the files located (or linked) at directories:
/var/www/site1
/var/www/site2
/var/www/phpmyadmin
I find the localhost environment to be a much better reflection of the real internet if instead I configure my websites each as “VirtualHost”
I strongly suggest this alternative.
I think we’re on the same page, but just to be sure, suppose the website is http://www.site.org and I have two blogs, named blog1 and blog2. I’d like requests for:
http://www.site.org/blog1
to go to blog1, and requests for:
http://www.site.org/blog2
to go to blog2, from a purely external point of view. I’m agnostic as to where the files and such are located, since this is my server. I’m free to do whatever.
From an internal point of view, suppose document root is /var/www/site. Then I assume the symlinks need to be set as:
/var/www/site/blog1@ –> /usr/share/wordpress
/var/www/site/blog2@ –> /usr/share/wordpress
There must be some kind of PHP variable to prefix MySQL table names to keep the blogs separate. Somehow, this PHP variable gets set differently depending on whether you request http://www.site.org/blog1 or http://www.site.org/blog2. Maybe mod_rewrite helps with this.
I also gather that mod_rewrite must also help in translating URLs for image files and such from the WP installation dir, /usr/share/wordpress, to the content directory, /www/www/wp-content. I think the same thing goes for plugins and language files.
Is this the general way things work?
Some of your expectations will not work.
/var/www/site/blog1@ –> /usr/share/wordpress
/var/www/site/blog2@ –> /usr/share/wordpress
Your different websites must have distinct sets of files, for a starter the contents of “wp-config.php” are specific to each website. Similarly the files in “wp-content/uploads” are also different. Yes many of the files are the same across sites, still there are essential differences.
Yes, there is a thing called multi-site, I do not believe it is appropriate to your situation.
Also:
There must be some kind of PHP variable to prefix MySQL table names to keep the blogs separate.
The way this happens is that each site has its own wp-config.php file.
Mod_rewrite is used to perform permalinks, it is possible to run sites without it.
Maybe I misunderstood, then. For example, from this site:
On the other hand, if you choose sub-directories or path based URLs for subsites on your network, then the only thing you need to do is enable pretty permalinks on your root site.
This is spot-on what I was hoping to achieve. It sounds like it would apply to me. Is this not the case?
By the look of this article, yes you should be able to run multisite your way.
My opinion is that for a first time install, that multisite is a complication you could do without.
You should have mentioned that you were configuring multisite from the very start, it changes everything.
Your further questions more appropriate belong in the multisite support forum. Please close this thread.
I thought when I mentioned “network of WP” in the original post it implies multisite (I thought “network” was the proper term for a “multisite”).
OK… I’ll post again in the proper forum.
Thanks!