Setting up a Development copy of the masspirates.org blog

From Mass Pirate Wiki
Revision as of 19:59, 1 May 2014 by Srevilak (talk | contribs) (initial revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Setting up a Development copy of the masspirates blog

source control

I've put wordpress (the masspirates blog) under git version control. The master git repository (on rose.mayfirst.org) is

 ~masspiratesweb/masspirates.org/include/git/blog  

Creating a local copy for development

To create your own copy of the masspirates.org blog,

 mkdir blog
 cd blog
 git clone ssh://masspiratesweb@rose.mayfirst.org/home/members/masspirateparty/sites/masspirates.org/users/masspiratesweb/masspirates.org/include/git/blog .

For now, I've excluded files in wp-content/uploads but I may change my mind about that in the future.

You'll need a MySQL database for your development environment. Like this:

 mysql> create database masspirates_wp default character set utf8;
 Query OK, 1 row affected (0.03 sec)
 mysql> grant all privileges on masspirates_wp.* to 'masspirates_wp'@'localhost' identified by 'SOME-PASSWORD';
 Query OK, 0 rows affected (0.00 sec)


Next, copy dev/sync.conf.sample to dev/sync.conf. Edit dev/sync.conf to provide local database parameters.

Next,

 cp wp-config-db.php.sample wp-config-db.php

Then provide the appropriate database configuration parameters in wp-config-db.php.

After you've done this much

 ./dev/sync.wordpress

sync.wordpress will download wp-content/uploads, create a backup of wordpress's database, and load that database backup on your local machine.