Use Subdomain as development platform

I posted this on Wordpress.org today... any thoughts..? Or are they any of your plugins that would help? I'll be using Blog Templates to create the beta.domain.com. Trying to figure out the rest...

=========

I've worked on a couple Multi-site projects and I had an idea I need some clarification on...

I want to install MS on my current setup to use as a development platform for a new theme, pages, posts, categories, custom post types... basically a completely different site... then flip that to the production site when I'm finished.

My Plan:

- Install MS
- Setup beta.domain.com
- Develop new site chock full of goodies
- Set domain.com to archive.domain.com
- Set beta.domain.com to domain.com

Would this work? Or is there some other way I should go about doing it. I've done the whole "separate single install, back up database, transfer files...blah blah." That whole process drive me nuts, and there is always something that breaks.

I was thinking this might be a faster, simpler solution. But I don't know if it'll work. Don't want to destroy my system. :slight_smile:

Any thoughts?

  • Timothy Bowers

    Hey cfai

    Would this work? Or is there some other way I should go about doing it. I've done the whole "separate single install, back up database, transfer files...blah blah." That whole process drive me nuts, and there is always something that breaks.

    Yup, I often try to tell people there could be issues when moving from a local development. It can be a pain can't it huh.. :slight_smile:

    There is something gaining momentum here:

    http://wpmudev.uservoice.com/forums/148158-wpmu-dev-development-and-feature-requests/suggestions/2562754-multisite-wp-manager

    Its our new way to collect feedback, plugin and feature requests.

    One of the features mentioned is moving sites from one network to another. Perhaps this could also be ideal for those developing locally as well. It could help speed up development time for sure.

    Perhaps add your own feedback there and more ideas if you have them :slight_smile:

    Failing that, if you develop the site on a multisite install an plan to keep them there you could also develop on a sub domain, get it all ready and then map their real on in when ready.

    Otherwise its the whole moving process. :slight_smile:

    Take care.

  • cfai

    if you develop the site on a multisite install an plan to keep them there you could also develop on a sub domain, get it all ready and then map their real on in when ready

    This is basically the plan. So, what would be the best way to map it over.

    I already have the main domain setup, it's been running for a few years. We're doing a complete overhall, so I copied the whole site onto a subdomain with Multisite (beta.__.com) using Blog Templates, and started the re-dev.

    So once I'm finished, how do I map the subdomain to be the main domain?

  • airfoil

    Staging and developing for multisite is a total hassle, and something I've struggled with for a long time. In particular, making big changes to an existing production installation. It would be very excellent if the WP team would not insist on including fully qualified domain names all over the place in the database - including in serialized strings. That would make it easier to move things around. From what I've heard from Andrea Rennick, the idea is floating around, but it's not currently on the roadmap.

    That said, a few ideas:

    Idea #1
    These guys have posted a detailed method for development, staging and QA in Multisite:
    Scott Taylor: WordPress in Dev, QA, and Prod

    Definitely a lot to digest, but very much worth a read. I have not had a chance to try this yet - and it gets into some areas that are outside my comfort zone, but it seems like a killer solution to the problem.

    Idea #2
    Set up something like MAMP/WAMP on your local box. I have MAMP Pro installed on my development Mac. I set up the WPMS install locally, and use MAMP to toggle the hosts file. This works if you don't have to work with a million subdomains, as each one needs to be added to the local hosts file. However, for a main site (which is what is usually the big problem for me) it works great. I can then easily dump the local database and prop it to the live server. All the domain info is correct, and things work right out of the box.

    Note that since this is local to your machine this is not a great solution if you have remote developers or content contributors that need to work on things.

    Idea #3
    If you need to have various contributors, and can set up a development domain (mydevdomain.com), take a look at and download Search and Replace DB from InterconnectIT. An excellent tool as it allows you to develop on a different domain, then dump your database and replace the development URL - including where it is part of serialized data - to reflect the actual domain (mydomain.com) of your production site.

    Good luck. Let us know if you arrive at something that works well.

  • Timothy Bowers

    Well you would have a multisite install, so lets say:

    maindomain.com

    Then all sub sites aka development sites are:

    devel1.maindomain.com
    devel2.maindomain.com

    Then when they are ready, you map the clients domain in.

    devel1.maindomain.com <---- clientdomain.com

    Then the devel website you developed for the client becomes clientdomain.com

    Hope this helps.

    If you have any further questions then please let me know. :slight_smile:

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.