Talk:Developing our WordPress Theme

From sshcWiki
Jump to navigation Jump to search

Here's the start of a script to pull stuff off of sshc-fs1. I'd check this into github, but github is being really terrible today. This should be enough to get started, but our space internet also just went offline, which prevents me from testing! :(

#!/bin/bash

# This script initializes a vccw installation with a copy of content from
# sshchicago.org.

FS1='fs1.sshchicago.org'
FS1DIR=/fserv/sitedev

# Prompt the user for their sshc username
echo "Enter your sshchicago.org LDAP username: " 
read username

# Restore mysql database
echo "Copying prod mysql database..."
rsync $username@$FS1:$FS1DIR/wordpress.sql /tmp/
mysql -uroot -pwordpress wordpress < /tmp/wordpress.sql

# Restore wordpress data
echo "Copying prod wordpress data (this will take a while)..."
pushd /vagrant/www/wordpress/wp-content/uploads/
rsync --progress -vr $username@$FS1:$FS1DIR/uploads/* . 
popd
echo "All done!"