whatwg / misc-server

Miscellaneous resources for the servers hosting *.whatwg.org domains
Other
22 stars 16 forks source link

Deploy blog.whatwg.org via DigitalOcean apps #150

Closed domenic closed 3 years ago

domenic commented 3 years ago

This seems to work: https://blog-6tqz3.ondigitalocean.app/.

However it's a bit hard to test things because WordPress has a very strong notion of what its own URL is, which I believe is stored in the database. So every link on that staging site actually ends up going to the original https://blog.whatwg.org/. I can't access the admin panel either.

It looks like maybe we could get a better test by setting some extra config settings https://wordpress.org/support/article/changing-the-site-url/ so I'll probably try that tomorrow.

domenic commented 3 years ago

It looks like maybe we could get a better test by setting some extra config settings https://wordpress.org/support/article/changing-the-site-url/ so I'll probably try that tomorrow.

I tried that today and I still can't really get it to work. I think it's hard-coded into the database, hmm.

Maybe we should try the approach in https://wordpress.org/support/article/changing-the-site-url/#wp-cli so we can confirm the blog is really working on the staging URL. The alternate approach is to just try to switch things over and see what happens, I guess.

foolip commented 3 years ago

@domenic I would try deploying this to staging.blog.whatwg.org with the necessary hack (edit database dump?) to change the URL that WordPress expects. If that's deployed correctly, I think we should just switch over.

domenic commented 3 years ago

Something is wrong with some of the posts linewrapping, e.g.:

My best guess is that something about the default WordPress installation converts \ns into <br>s, and maybe something about our plugins stops that?

domenic commented 3 years ago

https://benohead.com/blog/2013/02/15/wordpress-remove-addtional-line-breaks/ seems promising...

domenic commented 3 years ago

I see, it's our Text Control plugin, which seems a bit more involved:

image

domenic commented 3 years ago

OK, here's what I've done:

I did nothing on feeds. https://blog-6tqz3.ondigitalocean.app/feed is RSS (not Atom).

I think the next steps would be:

domenic commented 3 years ago

It works!