Running WordPress Multisite with MAMP

Inspired by Migrating WordPress to a New Server on the blog I decided to attempt to move my WP-BP test install from sergius to a MAMP install on my MacBook Pro (OS-X 10.6.8). Using these resources:

especially the last one, as a guide.
I saved the database and code

$ mysqldump testbp -u testbp_user -p >testbp-wordpressdb.sql
Now save the code:
$ tar -cvzf ~/archives/sabb2011/test-bp-code.tgz test-bp/

and copy/ftp to new server location. But where was this to be? All the spiel assumes that WP is the only application that you operate in the domain and so they always show dumping the code into the main public_html directory. But I want to run moodle etc as well, so I’m putting it in a subdirectory of htdocs which is the root documents dir for MAMP. The full location for the document root will be /Applications/MAMP/htdocs/test-bp
Having setup MAMP which is quite straightforward you want to reset the Apache port to 80.

Make sure that Web Sharing is off — System preferences : Sharing : uncheck Web Sharing service

Having copied and untarred the code into the chosen root directory and created the database with user, there are three configuration files that now need to be modified.

Configuration Files to modify

  1. Hosts. WordPress (and we’re talking multisite here) wants to run directly from a top level domain. So, unlike moodle which can run quite happily from something like wordpress wants to have the whole domain to itself with . So, since we’re working on a testing system with no real external users we can make up a domain and use that. But how to direct the made up domain name to our local system? Answer: use the old fashioned hosts file located in /private/etc/hosts and associate your made up name with localhost. Here’s what I did	localhost

    . Having edited this (you’ll need to use $sudo vim hosts to circumvent hostile permissions) flush the DNS cache with $ dscacheutil -flushcache.

  2. VHOST — virtual host. Having redirected the domain to the localhost the web server process — Apache — has to be informed where to direct the name next. This is done by mean of virtual host directives which are run indirectly from the Apache configuration file httpd.conf. In MAMP (and also FreeBSD but Linux works slightly differently) user configurable vhost directives are located in MAMP/conf/apache/extra/httpd-vhosts.conf. I merely copied the vhost directives I use on my sandbox and adjusted the paths to suit. Example vhost
    <VirtualHost *:80>
            DocumentRoot "/Applications/MAMP/htdocs/test-bp"
            DirectoryIndex index.html index.php
            ErrorLog "/Applications/MAMP/logs/test-bp_apache_error.log"
            CustomLog "/Applications/MAMP/logs/test-bp_apache_access.log"
           <Directory /Applications/MAMP/htdocs/test-bp>
                     AllowOverride FileInfo Options


    1. ServerName should exactly match what you used in the hosts file
    2. DocumentRoot is the full path to where the code is located
    3. Logs can be customized for this particular WP install. This is nice because you can have different logs for different installs.
    4. My understanding of the AllowOverride option is that it allows .htaccess files to operate in the given directory. Although this is set as default on the MAMP system it’s well to include just in case

    The final stage is to enable the vhost processing to operate (it’s commented out by default). Just edit the MAMP/conf/apache/httpd.conf to remove the comment marker as follows

    # Virtual hosts
    Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf

    Obviously, having edited these files you need to restart Apache which can be done either with sudo apachectl restart on the command line or use the OS-X MAMP app to stop and start the Apache & MySQL servers.

  3. create a new database. At this point for simplicity’s sake I decided not to use the existing database but to start from scratch using the command mysql -u root -p (obviously I’ve already reset the root password!) to create a new database
    COLLATE utf8_unicode_ci;
    mysql> GRANT ALL PRIVILEGES ON testbp.* TO <username>@localhost
    IDENTIFIED BY '***********';
  4. Where testbp is the arbitrary database name you choose, <username> is the name you choose to operate the database (obviously leave out the < and >) and ‘****’ it’s password.

  5. wp-config.php. So now we’ve configured the web server Apache to look in the right place and hook to index.php and the final piece of the puzzle is configuring the wordpress system itself using the wp-config.php file. In wp-config.php configure the database name, user, password using the parameters from the create database stage and the hostname has to be ‘localhost’ and make sure to configure charset and collate
    /** Database Charset to use in creating database tables. */
    define('DB_CHARSET', 'utf8');
    /** The Database Collate type. Don't change this if in doubt. */
    define('DB_COLLATE', 'utf8_unicode_ci');

    as well. Configuring multisite is not intuitive however. You have to add the following directive just before the end o the file : define('WP_ALLOW_MULTISITE', true); and then save but don’t quit. Now start up your WP with the domain URL you used (mine was and it’ll ask you to configure an admin username and password. Write this down somewhere. You now logout and then log in with the admin username / password combo you’ve just forgotten! Click on Tools : Network Setup (or it might be Settings : Network Setup) and here you’ll find code to add to the wp-config.php file and .htaccess. Do this while the WP is still running (command line editing with vim makes this so much easier), save wp-config and .htaccess and logout of WP. Now when you login as admin again you’ll see ‘Howdy admin’ at the top right and pulling this down will reveal either Site Admin or Network Admin screens. Yea — it works!

Actually, you’ve edited five files, but there you are.

But I really want to use my current database and code

Here’s what to do, but as yet it is untested by me.
Unfortunately (unlike moodle again) the WP domain use for the site is hard coded into the database records. What this means is that if you want to move the site to a different domain (yes) we’re going to have to change that hard coded URL. This is actually quite straightforward using the command line (in fact on a Unix system everything turns out to be more straightforward this way). So we’re going to edit the dumped database sql code, create the new database with the same settings (name, username, password) as before (for ease of operation only) and then use the same wp-config.php file.

  1. Fix the exported database
    $ sed -e 's;;;g'
    testbp-wordpressdb.sql >testbp-wordpressdb-fix.sql

    This uses the stream edit sed to to do a global substitute s; .... ;g of the old domain name for the new domain name from the exported database testbp-wordpressdb.sql and outputting to the fixed db testbp-wordpressdb-fix.sql

  2. Create a fresh database as above (use existing name, username, etc)
  3. Import the fixed database
    $ /Applications/MAMP/Library/bin/mysql -u <username> -p -D testbp

    Where <username> is the username you have created the database with above and testbp is the newly created database name. You will be prompted for the database user password.

Now, having untarred the code into a suitable directory, configure hosts and VHOST as above with the appropriate directory location and configure your wp-config.php file accordingly. Keep the current multisite directives and if the paths match, you should be good to go. I have not tested this yet so I’m not sure of it’s outcome.


  • Check paths in hosts and httpd-vhosts.conf. Make sure that httpd.conf is calling the vhosts. Check permissions. On MAMP Apache runs as the local user so ownership should not be an issue (normally it runs as user ‘www’ or ‘nobody’).
  • Check for consistency between wp-config.php and the database setup paramters you used (you did write these down?)
  • The error log and custom log that you specified in httpd-vhosts.conf which should be located in /Applications/MAMP/logs can often throw a lot of light on why things are pear shaped. Use tail -20 <log file name> to examine.

Hope this helps someone ………


Displaying video media

When we open up a blog site or wiki or whatever it’s nice to see all the media there and ready to go, right? Not necessarily. The problem is that when the player is set to ‘automatic play’ it’ll load in the media file as soon as the page is opened. As an example, here’s a latest Moodle blog entry from my Choral  Conducting class:

Choral Conducting blog video entry

Choral Conducting blog video entry

The ‘track’ in the player is grey because it has fully loaded the video. And every video clip gets loaded in the same way as soon as the displaying page opens. Which means that you cannot do anything until all the players have cached their content. Not so bad on campus with a wired connection; a pain in the botty department at home via a DSL internet connection. Here’s an expanded view of the same page (which had 7 video clips on it) (click to see full size):

Choral Conducting blog video entry -- 3 videos

Choral Conducting blog video entry -- 3 videos

So, adding videos as blog postings evidently doesn’t scale up very well since they all get displayed on the same page. I’m not sure how many entries are displayed by the OUBlog before it paginates but there is no setting to change this. Now to come up with a workable alternative.



Online, offline, classroom

This posting may seem to be a little off subject but I think it’s germane in the long run.

This Spring semester of newly minted year 2011 I’m auditing a class called ‘Choral Conducting’ with Dan Graves (who also happens to be a good cycling buddy). It’s at 8am Monday, Wednesday, & Friday and initially I thought that I would have difficulty getting up in time to attend the class. But it’s been so compelling that the early start has not been a problem even in the icy weather we’ve had lately.

There are a number of reflections I have about the class, the pedagogic process and the role of technology. Conducting for a choir is one of those areas where, though there is a vast body of written work out there, one cannot learn how to conduct from books (or, as we will find, by any other media); rather one needs a teacher who has the role of tutor or coach. But this is also not just an individual exercise since one also needs a group of people to sing — the other members of the class. Observing Dan’s teaching method as well as focussing on improving my own technique has been an interesting experience.


There are three areas that I saw where technology could be used.

  1. In the past, Dan has used a video camera to record the student’s practice sessions and has employed a Teaching Assistant, Bernie, to do the work. However, this has been cumbersome since the tape has to be edited to extract the student’s individual work and then burned to a CD/DVD.
    This year we’re using a Flip camera (recording HD quality!) to record digitally. This has some marked advantages and a couple of drawbacks. Advantages are that it’s easy to create separate recording files for each person — just hit the red button to record and to finish.  Disadvantages are the HD video, while good quality, produces big files very fast and we have a 128Mb upload limit. So Bernie (the TA) has to use VideoChimp on the Mac to downshift the video size from 1200 to 960×528 (Apple TV size). The other drawback is that there is no real zoom to this camera so it’s not possible to zoom in on the conductor.
  2. Commenting. An initial assignment was to comment on someone else’s conducting efforts for the first assignment.  I was gung-ho to do this by means of a Forum in Moodle. After all that’s what forums are for, right? Well, Dan shrugged off my badgering and opted for written assessments which we had to give copies to him and to the other person. In the event, it proved wise since some of the comments were apparently rather sharp.
  3. Moodle. How to display the video recordings of conductor’s practice efforts? I found by trial and (lots of) error that Moodle 1.9.9 will play MOV and MP4 video files. So, what moodle activity should I use to frame the student’s videos? It had to be something that was straightforward for the TA to operate, so cutting and pasting URLs was out. There were three options:
    1. Forum. This would have been fine if we were looking for comments to be made by everyone in the class. But this wasn’t the case so we passed on that.
    2. OUWiki. I had in mind a class wiki with the videos for each class session on a single page. Here again Dan wanted individual display of videos.
    3. OUBlog. We ended up using the OUBlog activity and one ‘blog’ per student. Bernie would have write access to the blogs and would upload the video files, create a new blog post and link to the new video.
  4. Dan wanted the students to have access to all their conducting videos at the end of the course. Here is where some forethought was required in the arrangement of folders. Rather than group the video files by class (which would have been initially easiest) I had Bernie create one folder per students and then upload the student’s most recent video file into that location. Thus at the end of the course it’s a simple matter to zip up all the files together and place a link to the Zip in the appropriate blog entry.

Dan opted not to do anything else online. Written assignments were to be handed in during class, and were returned. Comments on one’s own performance were to be written down and handed in on paper. Even the readings, of which there were many to start with, were ‘on reserve’ in the Library rather than scanned as moodle resources.


As I alluded to above, it’s been instructive to both observe the teaching style of a highly experienced teacher and to be taught Choral Conducting technique at the same time. One thing that does stand out is the importance of discernment in the use of technology. If Dan had been more comfortable with technology the perhaps more things would be done online (eg handing in written assignments). But even as I complained about the hassle of having to take books out on two hour reserve and read them in that time I realised that there’s something to be said for encountering the written word in it’s original medium. There’s no way to replicate the feel, and even the smell, of an older book which does add a certain something to the way we process the knowledge contained therein.

Distinctiveness and community of learning

Does a small Liberal Arts college such as Earlham College need to be distinctive in order to provide a good education? Perhaps not. Does it need to be distinctive in order to survive and prosper? Probably so. President Doug Bennett’s recent blog posting IS Earlham a distinctive college? made the fruitful analogy between excellence/distinctiveness and nutritious/flavourful. If we think in these terms, what sort of flavour does Earlham actually have for our students? I submit that the flavour we experience at Earlham has to do with our Quaker tradition and in that regard we are indeed unique among liberal arts colleges in North America. The question then becomes how can we articulate the nuances and subtleties of how this tradition is expressed in our campus community to young high school students in a convincing yet authentic way. A way forward, I believe, can be gleaned from an insightful video from Georgetown University in Washington. Entitled ‘Reimagining Tradition: the Spirit of Teaching and Learning at Georgetown‘ the mere title lets us know that the teaching enterprise is grounded in a tradition of the university. What emerges later that this tradition is in fact Jesuit (we even see a priest as a faculty member) and that the spirit associated with this tradition is helping Georgetown faculty reimagine their teaching efforts to the demonstrated benefit of the students. Moreover the video doesn’t talk about curriculum (at least not directly), it doesn’t talk about teaching faculty concerns, it is even reasonably free of platitudes; instead it gives concrete examples of great teaching and how this has itself changed and also changed the lives of students, and situates this ‘reimagining’ within the tradition of Georgetown.

We could do this at Earlham. We already are to some extent. I’m not thinking about producing a video, more about realizing Earlham’s Quaker tradition both in the way we teach and what students take away from their Earlham experience. What components are we talking about?

  • Simplicity. Here is one area where we struggle to simplify our lives.
  • Peace. Peace and it’s associated virtue, justice, are undercurrents which run through many courses. The campus student body is very concerned with global peace and justice issues.
  • Integrity. This has two strands. The obvious one is living a life of truth and seeking truth. Then there is the path to achieving integrity of character and the way the Earlham helps build authentic persons who can go out into the world with a better self knowledge and understanding.
  • Community. Henri Nouwen once described community as ‘living with the person you would least choose to live with’. Earlham’s tradition of equality brings with it a radical diversity in which real community spirit can be forged.
  • Equality. Bringing a radical diversity both in the student body and in curricular offerings together under one tent. The absence of hierarchy is at first confusing, then perplexing, but finally liberating. Equality of persons is a strong Quaker tradition that we try to realize in our everyday lives and in teaching faculty’s respectful interactions with their students.

So far,  I haven’t addressed the ‘community of learning’ part and what, if any, relevance this has to  my social networking explorations but this will follow in a subsequent post.

Stream of consciousness

I’ve been having some fun setting up a new incarnation of Moodle for next academic year. I’ve found some interesting new modules such as:

  • BIM — Feed aggregation Management and Marking.  Mark (=grade) blog posts within moodle! 🙂
    This one’s from Australia and promises to change the way teachers can use blogs. More about this later.
  • ForumNG — Open University’s discussion Forum on steriods. This really ought to become that standard Moodle Forum type for version 2.0. It’s that good.
  • Enhanced File Module — single simple upload of multiple files and generate resources. Great for Course Assistants like Cheri Gaddis.
  • Time Management Module — aka ‘progress’. This is a simple block which shows a student’s progress on doing the stuff ina course. Wonderfully simple yet pedagogically powerful.

Much more details on my Millenium Moodle Issues tiddlywiki site.

Anti-Social Networking

The amazing Boone Gorges has recently released yet another wizzo BuddyPress plugin called Invite Anyone (mk 2) . Not content with this I followed a link to a comment thread from which the topic of ‘Friends’ in social networks emerged:

“It seems to me that the asymmetric model of twitter followers is one that encourages fandom rather than mutual connection. ……  we’re probably less interested in encouraging “fans” than in establishing mutually affirmed, symmetric, friend connections. An asymmetric model could cause all sorts of social problems, with people being upset that someone didn’t follow him or her back.”

and more from the same poster:

“Having said all of that, I’ve been talking to a few members of our community lately who feel uncomfortable with facebook-like friending entirely. These discussions have made me realize how little we’ve actually theorized these issues, and how important it is that we do so soon.” (my italics)

and from the next poster:

“On Twitter, if you’re “following” someone, you’re not a fan as well, you’re just interested in what the person is up to, which is why I love how they use the term “follower”. It doesn’t create any connotations or anything, it is what it is. Another reason why terminology is important when developing a product or service!” (my italics again)

[What’s interesting to me is that Twitter has done this and the term has ‘stuck’].

And Boone himself weighed in with :

“It seems overly simplistic to claim that the possibility of asymmetric relationships “encourages fandom”, as Matt puts it. Twitter is a case in point. Just because Twitter is set up such that the only relationships that are technically relevant in the system are asymmetric, it doesn’t follow that the Twitter platform encourages fandom rather than what you might call a more genuine connection. Bidirectional friendships emerge from and supervene on unidirectional relationships without there being a formal structure to describe them. I see this kind of emergence as a strength of the system, as relationships that arise without a formal structure underlying them are on balance more likely to be worthwhile (I would think, anyway).

[But here is where a study might be in order — hands up Dana Boyd? . Perhaps the possibility of asymmetric relations doesn’t necessarily encourage ‘fandom’ but maybe in actual practice this is often the case. Problem is that to compare you’d need  to find a Twitter like service that has does not have this system, and that’s well nigh impossible. Maybe there are other ways of approaching this? ]

From a practical point of view, though, Matt’s right that there are social issues that arise in spaces like Twitter that don’t in spaces like Facebook or BuddyPress. Hurt feelings might be one of them, though I’m skeptical that such consequences are really all that dire, all so-and-so-didn’t-follow-me-back-on-Twitter bitching aside. I’m more interested in what might happen (both good and bad) as members of a professional community start to experience the arc exemplified by the Twitter user lifecycle: feeling uncomfortable about the idea of following people you don’t know, feeling stalked when other start following you, feeling like you have to follow people back, feeling proud when you get certain kinds of followers, and so on.”

This brought back to my mind an extremely perceptive blog posting (a term paper in fact) that a student in my class (Tessa Bricker) wrote several years ago (five to be precise) bewailing the commodification of friendship as she termed it. Entitled ‘Anti-Social Networking: The Commodity of “friend”ship‘ she makes the following points (did I say already that they were perceptive?):

  • “Friendships are built on shared experiences and trust. With social networks, friendships are broken down to the simplest terms. Instead of being based on trust and experiences, friendships in social networks are engaged in for less pure purposes. Instead of quality friendships, services like Friendster, are all about collecting the most friends.”[She writes about Uncomfortable Situations (referred to above), classifying friends and then quality of friendship :]
  • “Social networks cheapen friendship, turning it into a commodity, to be collected not valued for anything other a number or a means to get in contact with someone else.”[And here’s the stinger :]
  • “Social networks are designed to bring people together and they do that successfully. People meet, find dates, make friends, and find employers through social networks. The term friend really shouldn’t be used to describe buddies on the Internet. The term implies more of an emotional bond and connection than most people have with people they meet on the Internet. Social networks are eroding the values placed on friendship by turning friends into commodities.”

So there you have it. The term ‘friend’ should not be used to describe buddies on the internet. How right this is. I think that this is an excellent point, and thanks to a video from Boone Gorges himself it’s possible to change the term on a BuddyPress installation. But what to? “buddy”? After all, it’s called Buddy Press 🙂