Difference between revisions of "Developing our WordPress Theme"

From sshcWiki
Jump to navigation Jump to search
m (Bot: Cosmetic changes)
 
(8 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Information Technology]]
+
= Fun with WordPress Theme Development =
[[Category:HOWTO]]
 
 
 
= Fun with WordPress Theme Development =  
 
 
This is a quick howto to get started with developing a wordpress theme using Vagrant
 
This is a quick howto to get started with developing a wordpress theme using Vagrant
  
Line 14: Line 11:
 
If you're on a non-Unix workalike, you'll probably also want an SSH client, though it's not strictly necessary.
 
If you're on a non-Unix workalike, you'll probably also want an SSH client, though it's not strictly necessary.
  
== Install VCCW ==  
+
= HOWTO =
Just follow the instructions under "Getting Started" at http://vccw.cc
+
The steps below were taken on a Macintosh, but should really be more or less the same on any platform that Vagrant runs on.
  
Once it's set up, you should be able to hit http://192.168.33.10 to bring up a local wordpress instance. Hit http://192.168.33.10/wp-admin and log in with admin/admin to get to the admin panel!
+
Start with getting the prerequisites installed.
  
== Check out our WordPress theme ==
+
Then:
 
+
* Make a new directory:
In the unpacked directory from VCCW, switch to the directory /www/wordpress/wp-content/themes.  
+
  mkdir sshc-dev
 
+
* Clone the VCCW repo in there.
Then, just clone our fork of the Untitled theme:
+
git clone git@github.com:vccw-team/vccw.git sshc-dev/
 
+
Cloning into 'sshc-dev'...
https://github.com/sshchicago/untitled
+
remote: Counting objects: 2362, done.
 
+
remote: Total 2362 (delta 0), reused 0 (delta 0), pack-reused 2362
Make changes, test locally, and commit them back.
+
Receiving objects: 100% (2362/2362), 671.00 KiB | 0 bytes/s, done.
 
+
Resolving deltas: 100% (882/882), done.
Any changes you make in that repo will ''automatically'' be reflected in the Wordpress VM - you don't even need to SSH in! Nifty!
+
Checking connectivity... done.
 
+
* Change into that directory
Easy!
+
cd sshc-dev
 
+
* Fire the vm up so it can provision everything.
= TODO =  
+
vagrant up
 +
* Clone the utility repo into your vm:
 +
git clone git@github.com:cswingler/sshc-sitedevesetup.git
 +
* Check out our wordpress theme into the appropriate directory
 +
cd www/wordpress/wp-content/
 +
git clone git@github.com:sshchicago/untitled.git
 +
* Then, enter the VM and run the setup script.
 +
vagrant ssh
 +
bash /vagrant/sshc-sitedevesetup/sshc-vccw-setup.sh
 +
 +
And that's it! From there, you should be able to hit the VM and do things. Just go to http://192.168.33.10. Admin panel is at http://192.168.33.10/wp-admin, login/password admin/admin.
 +
 +
= TODO =
 
* Set up Jenkins job to create tarballs of all of our existing assets/db dump
 
* Set up Jenkins job to create tarballs of all of our existing assets/db dump
 +
* Document development flow
 
* Automate deployments from our github repo up to test
 
* Automate deployments from our github repo up to test
 
* Get test set up!
 
* Get test set up!
 +
 +
[[Category:Information Technology]]
 +
[[Category:HOWTO]]

Latest revision as of 22:15, 27 February 2017

Fun with WordPress Theme Development

This is a quick howto to get started with developing a wordpress theme using Vagrant

Install prerequisites

You'll need all of these:

If you're on a non-Unix workalike, you'll probably also want an SSH client, though it's not strictly necessary.

HOWTO

The steps below were taken on a Macintosh, but should really be more or less the same on any platform that Vagrant runs on.

Start with getting the prerequisites installed.

Then:

  • Make a new directory:
 mkdir sshc-dev
  • Clone the VCCW repo in there.
git clone git@github.com:vccw-team/vccw.git sshc-dev/
Cloning into 'sshc-dev'...
remote: Counting objects: 2362, done.
remote: Total 2362 (delta 0), reused 0 (delta 0), pack-reused 2362
Receiving objects: 100% (2362/2362), 671.00 KiB | 0 bytes/s, done.
Resolving deltas: 100% (882/882), done.
Checking connectivity... done.
  • Change into that directory
cd sshc-dev
  • Fire the vm up so it can provision everything.
vagrant up
  • Clone the utility repo into your vm:
git clone git@github.com:cswingler/sshc-sitedevesetup.git
  • Check out our wordpress theme into the appropriate directory
cd www/wordpress/wp-content/
git clone git@github.com:sshchicago/untitled.git
  • Then, enter the VM and run the setup script.
vagrant ssh
bash /vagrant/sshc-sitedevesetup/sshc-vccw-setup.sh

And that's it! From there, you should be able to hit the VM and do things. Just go to http://192.168.33.10. Admin panel is at http://192.168.33.10/wp-admin, login/password admin/admin.

TODO

  • Set up Jenkins job to create tarballs of all of our existing assets/db dump
  • Document development flow
  • Automate deployments from our github repo up to test
  • Get test set up!