{"id":532,"date":"2017-11-03T12:38:04","date_gmt":"2017-11-03T17:38:04","guid":{"rendered":"https:\/\/www.marcblase.com\/blog\/?p=532"},"modified":"2017-11-03T12:38:04","modified_gmt":"2017-11-03T17:38:04","slug":"tar-command-to-exclude-directories","status":"publish","type":"post","link":"https:\/\/ma.rcbla.se\/blog\/2017\/11\/tar-command-to-exclude-directories\/","title":{"rendered":"Tar command to exclude directories"},"content":{"rendered":"<p>Need to exclude specific dirs when wrapping a site up to push to production, specifically <code>bower_components <\/code>and <code>node_modules<\/code>. Run this command from the site root of your WP install.<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ntar --exclude='wp-content\/themes\/THEME_NAME\/bower_components' --exclude='wp-content\/themes\/THEME_NAME\/node_modules' -zcvf SITE_NAME.tar.gz *.php wp-admin\/ wp-content\/ wp-includes\/\r\n<\/pre>\n<p>NOTE: leave trailing &#8216;\/&#8217; off the path of dirs to exclude as <code>tar<\/code> doesn&#8217;t like it. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Need to exclude specific dirs when wrapping a site up to push to production, specifically bower_components and node_modules. Run this command from the site root of your WP install. tar &#8211;exclude=&#8217;wp-content\/themes\/THEME_NAME\/bower_components&#8217; &#8211;exclude=&#8217;wp-content\/themes\/THEME_NAME\/node_modules&#8217; -zcvf SITE_NAME.tar.gz *.php wp-admin\/ wp-content\/ wp-includes\/ NOTE: leave trailing &#8216;\/&#8217; off the path of dirs to exclude as tar doesn&#8217;t like it.<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-532","post","type-post","status-publish","format-standard","hentry","category-coding"],"_links":{"self":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/comments?post=532"}],"version-history":[{"count":1,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/532\/revisions"}],"predecessor-version":[{"id":533,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/posts\/532\/revisions\/533"}],"wp:attachment":[{"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/media?parent=532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/categories?post=532"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ma.rcbla.se\/blog\/wp-json\/wp\/v2\/tags?post=532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}