{"id":4,"date":"2016-01-25T05:21:05","date_gmt":"2016-01-25T05:21:05","guid":{"rendered":"http:\/\/bootstrap-it.com\/blog\/?p=4"},"modified":"2017-01-09T15:27:10","modified_gmt":"2017-01-09T15:27:10","slug":"wordpress-ubuntu-repository","status":"publish","type":"post","link":"https:\/\/bootstrap-it.com\/blog\/?p=4","title":{"rendered":"Installing WordPress from the Ubuntu repository: here be filesystem bloat"},"content":{"rendered":"<div id=\"s-share-buttons\" class=\"horizontal-w-c-circular s-share-w-c\"><a href=\"http:\/\/www.facebook.com\/sharer.php?u=https:\/\/bootstrap-it.com\/blog\/?p=4\" target=\"_blank\" title=\"Share to Facebook\" class=\"s3-facebook hint--top\"><\/a><a href=\"http:\/\/twitter.com\/intent\/tweet?text=Installing WordPress from the Ubuntu repository: here be filesystem bloat&url=https:\/\/bootstrap-it.com\/blog\/?p=4\" target=\"_blank\"  title=\"Share to Twitter\" class=\"s3-twitter hint--top\"><\/a><a href=\"http:\/\/reddit.com\/submit?url=https:\/\/bootstrap-it.com\/blog\/?p=4&title=Installing WordPress from the Ubuntu repository: here be filesystem bloat\" target=\"_blank\" title=\"Share to Reddit\" class=\"s3-reddit hint--top\"><\/a><a href=\"http:\/\/www.linkedin.com\/shareArticle?mini=true&url=https:\/\/bootstrap-it.com\/blog\/?p=4\" target=\"_blank\" title=\"Share to LinkedIn\" class=\"s3-linkedin hint--top\"><\/a><a href=\"mailto:?Subject=Installing%20WordPress%20from%20the%20Ubuntu%20repository:%20here%20be%20filesystem%20bloat&Body=Here%20is%20the%20link%20to%20the%20article:%20https:\/\/bootstrap-it.com\/blog\/?p=4\" title=\"Email this article\" class=\"s3-email hint--top\"><\/a><\/div><p>Since this is the very first post on my shiny new Bootstrap-IT site blog, why not start things off with some of the joys and regrets that can accompany WordPress installations? I&#8217;ve built all kinds of WordPress sites but, until now, I&#8217;ve always done it the old fashioned way: Get the latest archive from the WordPress web site, upload it to my backend, create a database and user within MySQL (or, more recently, MariaDB), edit the wp-config.php file accordingly, copy the files to my document root directory, and set it all up from the browser configuration page.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-9 alignleft\" src=\"https:\/\/bootstrap-it.com\/blog\/wp-content\/uploads\/wordpress-ubuntu2.jpg\" alt=\"WordPress Ubuntu Repo Version\" width=\"235\" height=\"230\" srcset=\"https:\/\/bootstrap-it.com\/blog\/wp-content\/uploads\/wordpress-ubuntu2.jpg 235w, https:\/\/bootstrap-it.com\/blog\/wp-content\/uploads\/wordpress-ubuntu2-50x50.jpg 50w\" sizes=\"auto, (max-width: 235px) 100vw, 235px\" \/>This time, so I could rely on apt to keep me properly updated and patched, I thought I&#8217;d use the WP version from the <a href=\"https:\/\/help.ubuntu.com\/community\/WordPress\" target=\"_blank\">Ubuntu 14.04 repository<\/a>.<\/p>\n<p>In some ways, it&#8217;s a lot simpler. Just run apt-get:<\/p>\n<p><code>sudo apt-get install wordpress<\/code><\/p>\n<p>You will need to create a symbolic link between your document root directory and the WordPress files in \/usr\/share\/, which should look something like this:<\/p>\n<p><code>sudo ln -s \/usr\/share\/wordpress \/var\/www\/html\/wordpress<\/code><\/p>\n<p>Then you will extract the setup script:<\/p>\n<p><code>sudo gzip -d \/usr\/share\/doc\/wordpress\/examples\/setup-mysql.gz<\/code><\/p>\n<p>&#8230;and run the script specifying a database\/user name (myname, in this hypothetical example), and the blog location. Choosing the right details can sometimes be a bit tricky. Hint: don&#8217;t include a dash (-) in your values.<br \/>\n<code>sudo bash \/usr\/share\/doc\/wordpress\/examples\/setup-mysql -n myname localhost<\/code><\/p>\n<p>Now point your browser to http:\/\/yourdomain.com\/wordpress, set things up, and you&#8217;re done.<\/p>\n<p>Except that you may find you&#8217;re not done. Even if the installation went smoothly, you&#8217;ll probably need to add a new theme and some plugins. If you&#8217;re planning to do that manually, you&#8217;ll have to do it on Ubuntu&#8217;s terms, and those terms are, to be charitable, a bit strange. Here&#8217;s the thing: for some reason, the setup script created directories containing WP files (or links to other directories) in as many as SIX different places! And, while they often look identical to each other, they sometimes seem to perform very different tasks &#8211; at least as far as I can see.<\/p>\n<p>First of all, as I already mentioned, you will have created a symlink within your document root (usually var\/www\/html\/) to \/usr\/share\/wordpress\/. The full set of working WP files will therefore appear in both of those locations.<\/p>\n<p>My installation had another wp-content directory in \/srv\/www\/ &#8211; this one containing only a directory named localhost &#8211; probably the result of my use of &#8220;localhost&#8221; when running the setup-mysql script. Then there&#8217;s a completely NEW set of plugins and themes, etc., in the wp-content directory that, for some reason, makes an appearance in \/var\/lib\/wordpress\/. And all that is besides the WP configuration and htaccess files in \/etc\/wordpress\/.<\/p>\n<p>Here&#8217;s where things got fun for me. To manually install a new theme, it turns out that I needed to upload it to the themes directory in \/usr\/share\/wordpress\/wp-content, and THEN create a symlink to it in \/srv\/www\/wpcontent\/localhost\/themes\/.<\/p>\n<p><code>sudo ln -s \/usr\/share\/wordpress\/wp-content\/themes\/hiero \/srv\/www\/wp-content\/localhost\/themes\/hiero<\/code><\/p>\n<p>Again, this might be due to my choice of &#8220;localhost&#8221; during setup, but it&#8217;s an odd set of hoops to jump through. And it&#8217;s made a whole lot more odd by the fact that this workaround will only work for themes, but not for plugins. I suppose those little guys wouldn&#8217;t be seen dead in same directory tree as themes. Instead, you&#8217;ll have to put their royal highnesses in \/var\/lib\/wordpress\/wp-content\/plugins\/.<\/p>\n<p>I thought that I had a pretty good understanding of the Linux filesystem hierarchy standard &#8211; in fact, I&#8217;ve taught it a bunch of times as part of <a href=\"http:\/\/bootstrap-it.com\/\">LPIC-1 certification preparation<\/a> courses &#8211; but I&#8217;m not sure I understand what lies behind this tangled mess.<\/p>\n<p>But what about the comfort of knowing that my package will be automatically kept up to date? The apt-get repo version is WordPress 3.8.2, while the direct-download version is 4.4.1. I absolutely love the Debian software repositories: their tireless good work makes access to really outstanding software both reliable and safe. But it&#8217;s not always the best choice.<\/p>\n<p>The bottom line? The post you&#8217;re reading right now is part of a blog created using an up-to-date archive downloaded directly from <a href=\"https:\/\/codex.wordpress.org\/Installing_WordPress\" target=\"_blank\">the WordPress site<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since this is the very first post on my shiny new Bootstrap-IT site blog, why not start things off with some of the joys and regrets that can accompany WordPress installations? I&#8217;ve built all kinds of WordPress sites but, until&hellip; <a href=\"https:\/\/bootstrap-it.com\/blog\/?p=4\" class=\"more-link\">Continue Reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.2.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing WordPress from the Ubuntu repository: here be filesystem bloat - Bootstrap IT<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/bootstrap-it.com\/blog\/?p=4\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing WordPress from the Ubuntu repository: here be filesystem bloat - Bootstrap IT\" \/>\n<meta property=\"og:description\" content=\"Since this is the very first post on my shiny new Bootstrap-IT site blog, why not start things off with some of the joys and regrets that can accompany WordPress installations? I&#8217;ve built all kinds of WordPress sites but, until&hellip; Continue Reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/bootstrap-it.com\/blog\/?p=4\" \/>\n<meta property=\"og:site_name\" content=\"Bootstrap IT\" \/>\n<meta property=\"article:published_time\" content=\"2016-01-25T05:21:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-01-09T15:27:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/bootstrap-it.com\/blog\/wp-content\/uploads\/ubuntu4.png\" \/>\n\t<meta property=\"og:image:width\" content=\"600\" \/>\n\t<meta property=\"og:image:height\" content=\"424\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"David Clinton\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@davidbclinton\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"David Clinton\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/bootstrap-it.com\/blog\/?p=4\",\"url\":\"https:\/\/bootstrap-it.com\/blog\/?p=4\",\"name\":\"Installing WordPress from the Ubuntu repository: here be filesystem bloat - Bootstrap IT\",\"isPartOf\":{\"@id\":\"https:\/\/bootstrap-it.com\/blog\/#website\"},\"datePublished\":\"2016-01-25T05:21:05+00:00\",\"dateModified\":\"2017-01-09T15:27:10+00:00\",\"author\":{\"@id\":\"https:\/\/bootstrap-it.com\/blog\/#\/schema\/person\/2db6d8bce89bf20e8f06440c428abe68\"},\"breadcrumb\":{\"@id\":\"https:\/\/bootstrap-it.com\/blog\/?p=4#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/bootstrap-it.com\/blog\/?p=4\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/bootstrap-it.com\/blog\/?p=4#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/bootstrap-it.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing WordPress from the Ubuntu repository: here be filesystem bloat\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/bootstrap-it.com\/blog\/#website\",\"url\":\"https:\/\/bootstrap-it.com\/blog\/\",\"name\":\"Bootstrap IT\",\"description\":\"Learn technology using technology\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/bootstrap-it.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/bootstrap-it.com\/blog\/#\/schema\/person\/2db6d8bce89bf20e8f06440c428abe68\",\"name\":\"David Clinton\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/bootstrap-it.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fa132defc2e7804e08ce17c4644b6f88c498d73ed8d4c9c72039189f90df1af8?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fa132defc2e7804e08ce17c4644b6f88c498d73ed8d4c9c72039189f90df1af8?s=96&d=mm&r=g\",\"caption\":\"David Clinton\"},\"sameAs\":[\"http:\/\/bootstrap-it.com\/\",\"dbclinton\",\"https:\/\/twitter.com\/davidbclinton\"],\"url\":\"https:\/\/bootstrap-it.com\/blog\/?author=2\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing WordPress from the Ubuntu repository: here be filesystem bloat - Bootstrap IT","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/bootstrap-it.com\/blog\/?p=4","og_locale":"en_US","og_type":"article","og_title":"Installing WordPress from the Ubuntu repository: here be filesystem bloat - Bootstrap IT","og_description":"Since this is the very first post on my shiny new Bootstrap-IT site blog, why not start things off with some of the joys and regrets that can accompany WordPress installations? I&#8217;ve built all kinds of WordPress sites but, until&hellip; Continue Reading &rarr;","og_url":"https:\/\/bootstrap-it.com\/blog\/?p=4","og_site_name":"Bootstrap IT","article_published_time":"2016-01-25T05:21:05+00:00","article_modified_time":"2017-01-09T15:27:10+00:00","og_image":[{"width":600,"height":424,"url":"https:\/\/bootstrap-it.com\/blog\/wp-content\/uploads\/ubuntu4.png","type":"image\/png"}],"author":"David Clinton","twitter_card":"summary_large_image","twitter_creator":"@davidbclinton","twitter_misc":{"Written by":"David Clinton","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/bootstrap-it.com\/blog\/?p=4","url":"https:\/\/bootstrap-it.com\/blog\/?p=4","name":"Installing WordPress from the Ubuntu repository: here be filesystem bloat - Bootstrap IT","isPartOf":{"@id":"https:\/\/bootstrap-it.com\/blog\/#website"},"datePublished":"2016-01-25T05:21:05+00:00","dateModified":"2017-01-09T15:27:10+00:00","author":{"@id":"https:\/\/bootstrap-it.com\/blog\/#\/schema\/person\/2db6d8bce89bf20e8f06440c428abe68"},"breadcrumb":{"@id":"https:\/\/bootstrap-it.com\/blog\/?p=4#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/bootstrap-it.com\/blog\/?p=4"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/bootstrap-it.com\/blog\/?p=4#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/bootstrap-it.com\/blog"},{"@type":"ListItem","position":2,"name":"Installing WordPress from the Ubuntu repository: here be filesystem bloat"}]},{"@type":"WebSite","@id":"https:\/\/bootstrap-it.com\/blog\/#website","url":"https:\/\/bootstrap-it.com\/blog\/","name":"Bootstrap IT","description":"Learn technology using technology","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/bootstrap-it.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/bootstrap-it.com\/blog\/#\/schema\/person\/2db6d8bce89bf20e8f06440c428abe68","name":"David Clinton","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/bootstrap-it.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fa132defc2e7804e08ce17c4644b6f88c498d73ed8d4c9c72039189f90df1af8?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fa132defc2e7804e08ce17c4644b6f88c498d73ed8d4c9c72039189f90df1af8?s=96&d=mm&r=g","caption":"David Clinton"},"sameAs":["http:\/\/bootstrap-it.com\/","dbclinton","https:\/\/twitter.com\/davidbclinton"],"url":"https:\/\/bootstrap-it.com\/blog\/?author=2"}]}},"_links":{"self":[{"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4"}],"version-history":[{"count":8,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":234,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4\/revisions\/234"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bootstrap-it.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}