Exploring dual WordPress installations locally

I took to spending some time attempting to install a series of virtual servers on the local PC today, after 4-5 hours of playing around last night with various httpd.conf settings i was really getting nowhere.

So i took backups of the important data, themes and plugins naminlgy, and set about reinstalling Uniform Server (it’s basically a WAMP app), and used the built in virtual host creation tool (i had tried this previously). For some reason the gods were in my favour this morning as nothing has gone wrong thus far and i now have 3 virtual servers available for whatever testing i like, from a volunteer perspective this is great because i can run the latest trunk code and the current stable version in 2 installs without the need to use a sub-directory structure.

http://trunk.localhost/ – 3.0 currently
http://current.localhost/ – 2.9.2

To aid myself in keeping the trunk version current i have tortoise svn installed and occasionally (when i think to do it), hit the update button and get a copy of the latest files direct from the SVN (how i got that all working is quite a surpise to me in honesty).

Once both installs were running (install, DB and user creation aside, zzzZZZZ), i wondered how i was going to manage code across two installs, ideally i don’t want to be editting two copies of every file i decide to fiddle with, well at least not at a theme or plugin level.

So onto Google, “Windows sync two folders” were my search terms. This lead me to find a free application from Microsoft called SyncToy. I now have my plugins and theme’s a click away from being in sync with one another. I could delve into the details of SyncToy, but i won’t… suffice to say the trunk install folder is where i do my coding, i then simply sync the folders at the end by running a routine in SyncToy.

I thought the whole process was quite an archievement, going from a working install, then stripping it down to nothing, then building it all up again, and adding a bunch of cool stuff. I’m sure there are plenty of people that do these kind of things on a regular, perhaps even daily basis, but for me some the procedure is still a little alien, so i’m quite happy with myself today…


2 thoughts on “Exploring dual WordPress installations locally”

  1. Hi Nacin,

    I’m now using a single plugin that sits in each install (currently 3 installs – 2.9.2, 3.0.1 & trunk) that simply does something like … include'../../../my_functions.php', i simply plonk my code into the include.

    Also wrote a class that i call into my include above, it reads the pc hosts file and the apache conf and extracts the virtual hosts (parameter sets whether to return WP hosts or all hosts), which i then loop over and generate admin menu items for, it means i’m then only a click away from each installation.

    Also using SVN for each installation, it seems to speed up the process of replacing core files if i’ve been testing code changes to core files (i do this sometimes for testing or printing out data – not for real changes, of course i use hooks) or when setting up a new install.

    RE: Moving wp-content:
    Would an SVN update then think i’m missing the wp-content directory and re-download it? Not sure it’s something i need right now, but i might try it on another install anyway just for the heck of it… 🙂

    Thanks for commenting on my quiet little corner of the web… 😉

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s