Creating a occupyboston.org Development Environment: Difference between revisions

From wiki.occupyboston.org
Jump to navigation Jump to search
(Created page with "= Creating a MediaWiki development environment = == Obtaining the Source == <pre> mkdir occupyboston.org cd occupyboston.org git init git remote add origin occubos@boggs.mayfi...")
 
Line 1: Line 1:
= Creating a MediaWiki development environment =  
= Creating a occupyboston.org development environment =  


== Obtaining the Source ==
== Obtaining the Source ==

Revision as of 18:16, 18 April 2012

Creating a occupyboston.org development environment

Obtaining the Source

mkdir occupyboston.org
cd occupyboston.org
git init
git remote add origin occubos@boggs.mayfirst.org
git fetch origin
git merge origin/master

The "occupyboston.org" directory will be your document root.

Setup a Virtual Host

Add an IP/hostname mapping to your hosts file (e.g., /etc/hosts). For example:

 127.0.0.1     occupyboston.local

Add a virtualhost to your web server. For example:

 <VirtualHost localhost:80>
   ServerName occupyboston.local
   DocumentRoot /PATH/TO/occupyboston.org/
 </VirtualHost>

Create a Database

Run

$ mysql -uUSERNAME -p
mysql> create database occubos_wp;
mysql> exit

Configuration Setup

cd occupyboston.org   # this is the document root
Edit the file wp-config.php


Noteworthy Configuration Directives

If you'd like to use mod_rewrite, add the following to your webserver's virtualhost definition:

   RewriteEngine On
   RewriteRule ^/*$ http://obwiki.local/wiki/Main_Page [L]
   RewriteRule ^/?wiki/(.*)$ /index.php?title=$1  [PT,L,QSA]

If you don't want to use mod_rewrite, add this line to LocalSettings.php

 $wgArticlePath = false;

You may also want to add

 $wgUseSquid = false;


Additional Setup for Plugins

We enable several MediaWiki plugins, and some of these plugins require additional database tables. To install the additional database tables:

cd mediawiki
php maintenance/update.php

At this point, you should be able to create and edit pages in your development environment.


Miscellaneous Notes

If you'd like to look at boggs server configuration for wiki.occupyboston.org, you'll find it in ~obwiki/wiki.occupyboston.org/.red/apache2.

The live document root is ~obwiki/wiki.occupyboston.org/web/mediawiki/. Note that this is a checked out copy of git repository.