Inspired by Migrating WordPress to a New Server on the WPMU.org 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
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
- 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 domain.org/~markpea/test-moodle-site/1 wordpress wants to have the whole domain to itself with wordpress-test.domain.org . 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
127.0.0.1 localhost bptest.flyingnematode.org
. Having edited this (you’ll need to use
$sudo vim hosts to circumvent hostile permissions) flush the DNS cache with
$ dscacheutil -flushcache.
- 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
DirectoryIndex index.html index.php
AllowOverride FileInfo Options
- ServerName should exactly match what you used in the hosts file
- DocumentRoot is the full path to where the code is located
- Logs can be customized for this particular WP install. This is nice because you can have different logs for different installs.
- 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
to remove the comment marker as follows
# Virtual hosts
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.
- 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
mysql> CREATE DATABASE testbp DEFAULT CHARACTER SET utf8
mysql> GRANT ALL PRIVILEGES ON testbp.* TO <username>@localhost
IDENTIFIED BY '***********';
mysql> FLUSH PRIVILEGES;
Where testbp is the arbitrary database name you choose, <username> is the name you choose to operate the database (obviously leave out the
>) and ‘****’ it’s password.
- 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. */
/** The Database Collate type. Don't change this if in doubt. */
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
bptest.flyingnematode.org) 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.
- Fix the exported database
$ sed -e 's;blogs.sergius.earlham.edu;bptest.flyingnematode.org;g'
This uses the stream edit sed to to do a global substitute
s; .... ;g of the old domain name blogs.sergius.earlham.edu for the new domain name bptest.flyingnematode.org from the exported database testbp-wordpressdb.sql and outputting to the fixed db testbp-wordpressdb-fix.sql
- Create a fresh database as above (use existing name, username, etc)
- 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 ………
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
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
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.
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.
- 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.
- 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.
- 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:
- 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.
- 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.
- 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.
- 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.
Here’s an avatar worth branding:
The Flying Nematode
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.
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.
When it comes to creating a course site on WordPress I run into branding issues. WordPress MU is so much more than a blogging system. It’s a really effective pedagogical tool. But how can it be labelled so that the breadth of applications are not constrained by nomenclature? “Blog’ is too narrow. ‘Eportfolio’ too focussed. Can one system be used both for academic pursuits as well as social, community, philanthropic activities? Currently I’m running an all-in-one system that I have called ‘Earlham Learning Spaces’ (which is based on an obsolete and extinct version of Elgg (0.9)) but this is a mouthful and somewhat pretentious (“pretentious, moi?”). All this is preamble to a look at Macaulay Honors College’s WordPress system that they brand with the title of Eportfolios@Macaulay.
The whole front page is rather smart with explanation about what they mean by ‘eportfolio’ and a ‘Getting started’ page and helpful videos:
Macaulay eportfolio home page
Most of the student eportfolio sites are inaccessible from the web (which is OK if your portfolio is strictly for internal use) but class blogs are not. I stumbled across an interesting course site called “Shaping the Future of the City“. Now first off, this is a course and not an eportfolio and yet it has a URL with “eportfolio” in it. So straight away we hit a problem with naming. But the site itself is rather cool and accessible with an inviting home page with graphic, course overview and syllabus sections and right hand column with Course Information, Contacts and Tags. The pull down menus are tres froid and evidently based on Categories. The instructions for posting make it clear that this is a shared blog for the class (rather than post to your own blog and feed into the class blog) and that students are meant to assign a single category to each posting. That this is difficult to follow is evidenced by the number of posts that were miscategorized as ‘blog’ (besides the Weekly Blog’ instructions there were 4 introductions also cross categorized as ‘Introductions’ and one long posting ‘Anatomy of a Planning Study — Roosevelt Island’ which obviously belonged in the ‘Planning Projects’ Category).
Posts in the Introductions category
Having said that I liked the ‘home page’ I do think that it would be nice to have a different layout for the other pages though I’m not sure I could find a theme to do that!
What can Earlham take away from this course site example? I think that for our situation this would not be too difficult to either setup or manage. Having a course site that incorporates student work is, to my mind, pedagogically very powerful — much more so than the Moodle model where the teacher-student relationship dominates. However, one could still play to Moodle’s strengths by using the BIM – Feed Aggregation Management and Marking module to grade appropriate entries into the class blog within the Moodle system. Thus one would have a public course and private grading and feedback — ideal!