{"id":1725,"date":"2008-05-08T08:56:35","date_gmt":"2008-05-08T05:56:35","guid":{"rendered":"http:\/\/mummila.net\/nuudelisoppa\/?p=1725"},"modified":"2008-05-08T08:56:35","modified_gmt":"2008-05-08T05:56:35","slug":"mirroring-a-wordpress-blog-for-offline-viewing","status":"publish","type":"post","link":"https:\/\/mummila.net\/nuudelisoppa\/2008\/05\/08\/mirroring-a-wordpress-blog-for-offline-viewing\/","title":{"rendered":"Mirroring a WordPress blog for offline viewing"},"content":{"rendered":"<p>I&#8217;m making a note of this for my own future reference.<\/p>\n<p>As a premise, you need the blog to have <a href=\"http:\/\/codex.wordpress.org\/Using_Permalinks#Using_.22Pretty.22_permalinks\">pretty permalinks<\/a>. There might be a way to make <code>wget<\/code> handle those <code>http:\/\/site.com\/blog\/?p=123<\/code> -type URLs so that they can be viewed offline, but for me the easiest way around this was to simply switch to the <code>Day and name<\/code> option in <code>Settings &rarr; Permalinks<\/code>. That way individual posts will have URLs ending in slashes, resulting in the content being saved to a good old <code>index.html<\/code> inside a subdirectory, in the local copy.<\/p>\n<p>So obviously, if you&#8217;re mirroring someone else&#8217;s blog, whose settings you don&#8217;t have access to, and which <em>doesn&#8217;t<\/em> use pretty permalinks, you&#8217;ll have to find another way to make the downloaded filenames work.<\/p>\n<p>Otherwise, you&#8217;re good to go: fire up wget like this: <br \/><code>wget --convert-links --mirror --no-parent --no-host-directories http:\/\/site.com\/blog\/<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m making a note of this for my own future reference. As a premise, you need the blog to have pretty permalinks. There might be a way to make wget handle those http:\/\/site.com\/blog\/?p=123 -type URLs so that they can be viewed offline, but for me the easiest way around this was to simply switch to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[9387,26],"class_list":["post-1725","post","type-post","status-publish","format-standard","hentry","tag-blog","tag-open-source"],"_links":{"self":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1725","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/comments?post=1725"}],"version-history":[{"count":0,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/posts\/1725\/revisions"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/media?parent=1725"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/categories?post=1725"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/nuudelisoppa\/wp-json\/wp\/v2\/tags?post=1725"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}