The MU forums have moved to WordPress.org

WPMU-specific Development Process and Source Control (12 posts)

  1. lokioatmeal
    Member
    Posted 12 years ago #

    Let’s archive some good ideas about proper WPMU Development and Source Control Processes. Specifically, I’d like to hear how others are managing code from multiple developers on top of their WPMU installs. I know this crosses into theories of generic processes but I’d like to hear thoughts on this topic as it relates to WPMU-specific development.

    I think the ideal scenario is a WPMU core that is synced with the latest version. Then a wp-content directory in source control for your local development team. Then you only ignore blogs.dir? How do you manage DB changes? How do you get your developers to quickly be capable of setting up local working environments from which they can work? I’d like to be able to have a developer run a few commands and suddenly have a locally running copy of our repo from which they can work.

    I don’t know the right answer in this case — WPMU-specific. This is why I think some archived ideas would be good. I did not find any relevant existing information on the topic.

  2. honewatson
    Member
    Posted 12 years ago #

    Yeah interesting points.

    There are some changes that I have made recently to take advantage of Nginx plus some changes to shardb.

    Nginx Image Filter module can resize/crop and serve images at a rate of 2500 per second without proxy cache on one of my 1440 boxes. With proxy cache on it can server 5000 per second. I've changed the blogs.dir sub folders to the blogs sub domain rather than id via wp-config.

    That means I've been able to remove /wp-content/blogs.php completely and just have Nginx do image resizing.

    So soon I need to remove the resize options when uploading images in admin. I'm not sure if this can be done via a filter or via an action hook. If it can't be I will have to hack into the code.

    I've created a complete directory structure of wordpress with files that have been changed.

    I thought about your wp-content method above but down to the themes level for vip themes.

  3. andrea_r
    Moderator
    Posted 12 years ago #

    "How do you get your developers to quickly be capable of setting up local working environments from which they can work? "

    svn. It's what the devs at WP and MU use.

  4. lokioatmeal
    Member
    Posted 12 years ago #

    Yeah, svn for sure, but that will just get files to a new developer (assuming only wp-content is in the repo). How do people manage DB schema etc in a way that a new developer can just type a few commands and suddenly have a working local copy of a WPMU enviro? In the traditional app dev world, I get it. In the Rails world, I get it. But for some reason I just can’t seem to wrap my head around a good process to get a developer up-and-running quickly. Keeping in mind that we’re using WPMU as a base framework. Of course I am missing something here. And I doubt I’m alone. Which is why I’d like to hear some examples of exactly how other people are managing the dev efforts of a team on top of WPMU-specific development.

    I’m not sure how else to explain the dilemma. Perhaps there are some questions that will prompt a eureka moment?

  5. DeannaS
    Member
    Posted 12 years ago #

    Here's how we do it. We have some cheap hosting for dev purposes. Every developer has their own site there (multiple, actually). We have an svn server where we store the entire code base for each of our two production installs (core and plugins and themes). We do not do svn for blogs.dir.

    We have separate svn repos for each theme and plugin we develop. Each dev here uses slightly different tools and methods for handling those. I primarily use Eclipse. So, I work on plugins, upload to my dev environment, commit to the plugin svn repo for that plugin when I have a working version. Tag it, export it, and add the exported code to the relevant production svn repo.

    For testing our entire set up, we have test installs that work just like our production installs. For both of those, we pull the code directly from our svn repo to the server. So, we never ftp to either our test or production server. We SSH and do an svn up or an svn switch.

    Our theme developer just updates the property for the theme repo and changes the externals. So, themes all "live" in their own repo, but are pulled into the test and prod evironment via the externals.

    We tried to figure out a way to do plugins via externals, too. But, never could manage it because of the way mu-plugins work.

    Then, of course, I also have to update the repo for the wordpress.org plugin repositories, too.

    It's complicated, but it works for us.

  6. SteveAtty
    Member
    Posted 12 years ago #

    It is a big problem and its a complicated one and I think its something that is holding quite a bit of development back. There are a lot of coders out there who could contribute or who need help but moving from their single controlled code base sitting on their Dev server to something like SVN and keeping control of it all is such a scary idea that they just don't do it.

    I'm not sure if there really is an easy solution.

  7. andrea_r
    Moderator
    Posted 12 years ago #

    "How do people manage DB schema etc in a way that a new developer can just type a few commands and suddenly have a working local copy of a WPMU enviro?"

    They don't. They still have to set up a db with test data.

    "There are a lot of coders out there who could contribute or who need help but moving from their single controlled code base sitting on their Dev server to something like SVN and keeping control of it all is such a scary idea that they just don't do it."

    Kinda have to though if you want to kick it up that notch & roll with the big boys. ;)

  8. TexInWien
    Member
    Posted 12 years ago #

    Excellent discussion. I've added it to my favorites and hope to see the ideas fleshed out some more. Does anyone know of any detailed articles or tutorials that cover some of these topics? I'm in the midst of importing all of my wpsu projects into wpmu and I'm trying to model a professional development process that will work with wpmu.

    The coding and svn side of things looks pretty clear to me, but I agree with lokioatmeal that the db side of things needs some extra thought.

    I plan to host three wpmu installs at our host - development, testing and production. Developers should first code and test on a local checkout of the svn repository(ies) - that's clear. There are, however, important db settings that I feel need to be tested before going into production.

    For this reason, I'd prefer to identify these settings up front and make sure they're first made on the hosted development installation, where they can be developer-tested. Then I'd like to machine-replicate them to the test db for wider testing. Once they pass muster, I'd like to machine-replicate them to the production db. So, I'd like to make sure this class of db settings is never modified through the user interface directly on the production installation. It might make sense to do an automatic, scheduled export of the important settings and store that in an svn repository - will have to think about that.

    We'll also have custom_functions and custom CSS for each site hosted on wpmu, as well as global_custom_functions and global_custom CSS. I'm on the fence about whether to set up a separate repository for each site or not.

    It'd be great to hear some more thoughts on these issues. It's probably unrealistic, but I'd love to get everything set up correctly on the first go-around.

  9. kgraeme
    Member
    Posted 12 years ago #

    What db settings are you specifically referring to that you feel need to be tested before going into production?

  10. andrea_r
    Moderator
    Posted 12 years ago #

    That kind of rigorous setup I'd expect to see on a site with hundreds of thousands of users or more, with multiple boxes. Are ya that big? ;)

  11. TexInWien
    Member
    Posted 12 years ago #

    kgraeme: I'm still thinking this through, so I'm not sure yet. One type of db setting that would be a good candidate for testing before going live would be theme-specific options stored in wp_options. Layout, style, etc.

    andrea_r: We're nowhere near that big, yet, but one can hope :-) My background is top 10 international web agency and professional software development - big CMS implementations for international customers and complex web-based software (e.g. for bank, insurance, health care industries).

    I'm setting up our infrastructure from scratch at the moment. I'd like to bring some of the rigor from professional software development over to our WP development efforts - source control, issue-tracking, etc.

    What we plan to do is use wpmu as a cms platform for multiple, simpler corporate websites for our customers. So we'd be responsible for setup, admin, design, theme customization, plugins, hosting, etc., and each customer would only be able to update the content on his/her site.

    So, maybe not the typical target use for wpmu, but from what I've seen so far, I think wpmu would be an excellent platform for this kind of use. Feel free to disabuse me of that notion if you think otherwise :-)

  12. andrea_r
    Moderator
    Posted 12 years ago #

    Ah, gotcha. :) Actually, those kinds of sites are pretty common, at least from what I've seen.

    Might wanna have a look at how Automattic handles their stuff.

About this Topic

  • Started 12 years ago by lokioatmeal
  • Latest reply from andrea_r