Maintaining multiple WordPress sites question on efficiency

Status
Not open for further replies.

radio

Unconsciously competent.
Nov 18, 2007
1,536
48
0
auction2post.com
Probably not a question limited to just WordPress, but general coding efficiencies period.

I have several installs of WordPress for six sites that are very similar, but at the same time unique. I'm running into efficiency issues when I need to make a change across all of them. For example, I changed the_author() to the_author_login() since images could be linked to their posts, but not be affected if they change their display name. In the theme I change this in single.php and index.php. But here's how I'm doing it:

Navigate in SmartFTP to the subdirectory for each site, navigate to the theme, drag and drop the unique single.php and index.php file to the desktop (overwriting the two files if this is round 2+), open in Xemacs (on a windows machine) save files, close Xemacs, drag and drop two files into SmartFTP and overwrite the files I originally downloaded. Repeat. The navigating directories is a pain in the ass. Since these sites are a bit new there are several changes similar to the one above that I do across all sites.

Installing plugins is not near as tedious, but if you have any ideas along those lines, let me know too. I use firefox and CTRL + Tab alot w/ all admin windows open.

Thanks!
 


You should, may be able to. Theoretically, of course. Sounds like a good experiment. Wouldn't you be able to use php include? I know you would need to hack the theme to make sure the file calls go the right places.or example, the CSS need to be in the right place....
 
Keep the canonical copy of the site on your local computer (or in SVN). Make changes locally, then push it out. ncftp works great for this, as it only seems to upload changed files. It's easily scriptable, too.

Sean
 
I work in Linux, I don't know how you'd do this in windows, but I have multiple websites that are wordpress installs. So I have a websites/ directory, then under that, a directory for each website, and under each of those, a public_html directory that is the wordpress install.

I created a websites/themes directory and in there I put all my themes. Then I softlinked from each of the websites' public_html/wp-content/themes back to that dir, so each of the sites has a directory with all of the themes. I just modify files in that directory and then they're fine to upload.

I also made a rsync alias, so, really, I modify the theme and then type "put_website" and it rsyncs the files up to the server. It's fairly streamlined. The rsync's one of the reasons I like site5 (they'll let me rsync).
 
argh01, that's the obvious way and I didn't even think of it. :D Yeah a symbolic link would do it.

The only downside is if you want some customization between the themes, like different adsense channels or different offers in the sidebars or header then you just can't do it. You could get around it though with some php conditional statements.
 
I think it could be done with htaccess and a simple php include

for example in a php file you would have:
Simplified: dont use this live:
PHP:
<?
if (isset($_GET(['link'])){
$link = $_GET['link'];
} else {
$link = "index.php";
}
include (http://www.masterdomain.com/$link);
?>

then in a htaccess file all you would need to do is redirect everything to
index.php?link=whateverfilewasrequested.php

the only problem is you might need to change all the urls in your master wordpress install to reference/include the master domain but once youve done it once, its done!!

of course you would need to make a htaccess exception for the config file containing the db details but other than that i dont see any reason why it wouldnt work..

im gonna look into it when i get 5 mins as i think it could be useful:rasta:
 
Status
Not open for further replies.