openstreetmap / operations

OSMF Operations Working Group issue tracking
https://operations.osmfoundation.org/
99 stars 12 forks source link

Install Morden/Varia WordPress theme on blog.osm.org #1036

Open grischard opened 8 months ago

grischard commented 8 months ago

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.

grischard commented 6 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.

grischard commented 6 months ago

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.

tomhughes commented 6 months ago

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...

grischard commented 6 months ago

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.

grischard commented 6 months ago

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)

grischard commented 6 months ago

Draft PR to allow installing themes by zip: https://github.com/openstreetmap/chef/pull/660

grischard commented 6 months ago

Testing this for supporting.osm.org on https://github.com/openstreetmap/chef/pull/661

grischard commented 6 months ago

Waiting to see if Kevin wants another theme

grischard commented 6 months ago

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.