Open grischard opened 8 months ago
Grant and I were trying to remember what the issue was with chef'ing these. https://github.com/openstreetmap/chef/blob/071a853199b7045f4fe496a12495c52cafad7126/cookbooks/wordpress/resources/theme.rb#L47-L65 seems to only allow installing from git and svn, which in some cases isn't the same as the zipfile. Setting up a private repo is just kicking the snofwlake down the road. The "proper" way of doing this for wordpress themes and plugins is with wp-cli.
Alternatively, we accept that the civicrm and blog wordpresses will have plugins and themes installed with a .zip download, or as snowflakes manually - we back these up every night anyway.
Won't wp-cli just make API calls to wordpress to do the install? Which won't work as our permissions don't allow the web server context to write to the themes or extensions...
Ah, yes, I remember now, that's why we haven't done that - it was a permissions issue. Wp-cli can run as any user, but it needs to run as someone who has write access, and there was a wordpress/www-data conflict.
And the theme wasn't the same as the svn because there was some compilation of css assets going on (and cheffing that would be madness)
Draft PR to allow installing themes by zip: https://github.com/openstreetmap/chef/pull/660
Testing this for supporting.osm.org on https://github.com/openstreetmap/chef/pull/661
Waiting to see if Kevin wants another theme
It's working well on supporting.openstreetmap.org, but needed a bit of dancing to activate the chef'd theme: it had two directories, morden
and morden-wpcom
, varia
and varia-wpcom
. I had to delete the old directories without -wpcom
.
The theme on supporting.osm.org looks much more modern than the old one on blog.osm.org.
Install these two through chef:
https://wordpress.com/theme/varia (parent theme) https://wordpress.com/theme/morden (child theme)
Don't activate it yet.