danvk / danvk.github.io

danvk github pages
4 stars 0 forks source link

Migrate old blog #5

Closed danvk closed 9 years ago

danvk commented 9 years ago

The old blog is at http://www.danvk.org/wp/. It still gets lots of traffic, particularly to http://www.danvk.org/wp/dragtable/.

This looks like a good way to do the migration: https://github.com/benbalter/wordpress-to-jekyll-exporter

It should convert everything (including comments) to static content.

danvk commented 9 years ago

I should also save all my drafts: there's years of unpublished stuff in there!

danvk commented 9 years ago

wordpress-to-jekyll-exporter doesn't preserve comments, unfortunately.

danvk commented 9 years ago

Next guy to try: https://wordpress.org/support/view/plugin-reviews/really-static

danvk commented 9 years ago

... and finally went with httrack for making a purely static mirror. Weighs in at ~3500 files and ~70MB.

danvk commented 9 years ago

Now serving this at https://danvk.github.io/wp/.

The one flaw I can see is that http://www.danvk.org/wp/?p=42 used to redirect, whereas http://danvk.github.io/wp/?p=42 does not. Unclear if anyone uses these or links to them...

danvk commented 9 years ago

Here are the redirects that were requested for ~1 week of logs:

$ grep '/wp/?' access.log* | grep -v 'bot' | grep -v 'Bot' | perl -pe s'/.*"(GET|HEAD|POST) //' | perl -pe 's, HTTP/1.[01].*,,' | sort | uniq -c | sort -nr | less
 201 /wp/?feed=rss2
 159 /wp/?feed=atom
  54 /wp/?feed=comments-rss2
  45 /wp/?page_id=2
  10 /wp/?p=87
   6 /wp/?p=254
   5 /wp/?p=71
   4 /wp/?p=66
   4 /wp/?p=189
   3 /wp/?p=257
   3 /wp/?p=19
   2 /wp/?p=67
   2 /wp/?p=65
   2 /wp/?p=259
   2 /wp/?p=212

One idea would be to make "/wp/" redirect to an external server which would run a simple script to redirect back to the appropriate page.

danvk commented 9 years ago

At the end of the day, I think this is not worth the effort. There are ~15 requests/day for these pages that aren't from bots. They'll just get the main page of the blog. That's not so terrible. I could even do a JS redirect if I were feeling ambitious.

danvk commented 9 years ago

Commit f99fa0d6ef808a2ba468587d3f7eab800d448f1e is as good as it's going to get.