<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Drupal on Living Systems_</title>
    <link>https://livesys.se/tags/drupal/</link>
    <description>Recent content in Drupal on Living Systems_</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 20 Aug 2020 17:42:00 +0200</lastBuildDate>
    <atom:link href="https://livesys.se/tags/drupal/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Creating a static copy of a Drupal, Wordpress or other CMS website</title>
      <link>https://livesys.se/posts/static-copy-of-cms-website/</link>
      <pubDate>Thu, 20 Aug 2020 17:42:00 +0200</pubDate>
      <guid>https://livesys.se/posts/static-copy-of-cms-website/</guid>
      <description>&lt;!-- raw HTML omitted --&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget -P . -mpck --html-extension -e &lt;span style=&#34;color:#000&#34;&gt;robots&lt;/span&gt;&lt;span style=&#34;color:#000&#34;&gt;=&lt;/span&gt;off --wait 0.5 &amp;lt;URL&amp;gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To understand the flags, you can check &lt;code&gt;man wget&lt;/code&gt; of course, but some&#xA;explanations follow here:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;-P - Tell where to store the site&lt;/li&gt;&#xA;&lt;li&gt;-m - Create a mirror&lt;/li&gt;&#xA;&lt;li&gt;-p - Download all the required files (.css, .js) needed to properly&#xA;render the page&lt;/li&gt;&#xA;&lt;li&gt;-c - Continue getting partially downloaded files&lt;/li&gt;&#xA;&lt;li&gt;-k - Convert links to enable local viewing&lt;/li&gt;&#xA;&lt;li&gt;&amp;ndash;html-extension - Add the .html extension after file names. This&#xA;is important since when serving the plain files, a web server such&#xA;as NGinx need the .html extension to know that the files should be&#xA;sent directly to the user&amp;rsquo;s browser, not offered as a file to&#xA;download. See below for how to redirect from old to new links.&lt;/li&gt;&#xA;&lt;li&gt;-e robots=off - Don&amp;rsquo;t read the robots.txt file. Not sure exactly&#xA;how this one works, but I got a lot of errors if not including it.&lt;/li&gt;&#xA;&lt;li&gt;&amp;ndash;wait 0.5 - It is better to not overwhelm the web server where&#xA;your site is hosted, by waiting a little between each page download.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;After finishing this command, you will have a folder with static&#xA;HTML-files and other files, that you can just upload to your web server&#xA;instead of your CMS.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
