{"id":9589,"date":"2013-09-18T22:05:11","date_gmt":"2013-09-18T21:05:11","guid":{"rendered":"https:\/\/brennigjones.com\/blog\/?p=9589"},"modified":"2013-09-18T22:15:08","modified_gmt":"2013-09-18T21:15:08","slug":"moving-the-second-part-iii","status":"publish","type":"post","link":"https:\/\/brennigjones.com\/blog\/?p=9589","title":{"rendered":"Moving the second (part III)"},"content":{"rendered":"<p>Well.<\/p>\n<p>In the best traditions of technical geekery, the next part in the exercise to self-host on a Synology Diskstation NAS was not as straightforward as it could have been.<\/p>\n<p>But I got there.<\/p>\n<p>There are a few very minor gremlins to sort out, but tonight was all about establishing a proof of concept, and implementing a prototype self-hosted, php-based\/MySQL-backed website.<\/p>\n<p>I began by taking a copy of WordPress from my downloads folder. I knew it was not the current version, but that was part of my plan &#8211; I wanted to see how the self-upgrade function would work on a self-hosting NAS.<\/p>\n<p>I exploded the zipped WordPress files locally, and copied the exploded WP structure and files over to the appropriate web-folder on the NAS.<\/p>\n<p>Then I fired up the phpMyAdmin console and attempted to create a new MySQL database.<\/p>\n<p>Snag.<\/p>\n<p>phpMyAdmin could navigate around the default structure of MySQL databases, but it wouldn&#8217;t create anything.<\/p>\n<p>I checked the permissions which, naturally, were good &#8211; I had logged in as root &#8211; so I tried again. And again.<\/p>\n<p>The console just hung on a create command.<\/p>\n<p>I navigated to users and tried to create a new user, but that achieved the same square-root-of-absolutely-nothing result.<\/p>\n<p>I then spent a good 20 minutes googling various combinations of the words &#8216;phpMyAdmin fails to create new database and user&#8217;.<\/p>\n<p>The only thing I learned is that a significantly large number of people don&#8217;t know the difference between hosted and self-hosted, and root and full access permissions.<\/p>\n<p>Obv.<\/p>\n<p>So then I looked at shelling out to the MySQL command prompt and using command-line syntax to create the database.<\/p>\n<p>Fortunately MySQL syntax is a variation on the PL\/SQL that I speak, so, refreshed in the patois of MySQL, I rolled up my sleeves and&#8230;<\/p>\n<p>&#8230;\u00a0thought about it.<\/p>\n<p>Why is phpMyAdmin allowing me to do everything except execute any type of write command?<\/p>\n<p>I scouted around the internet for a phpMyAdmin upgrade, because the more I thought about the problem, the more it began to feel like a command\/interface issue.<\/p>\n<p>I went on to Synology&#8217;s website and, while looking for a phpMyAdmin upgrade I discovered that the operating system of my NAS was two versions out of date.<\/p>\n<p>It was a bit of a swervy long-shot, but I gave it a go and upgraded the OS.<\/p>\n<p>Twice.<\/p>\n<p>Then I ran phpMyAdmin again, navigated to the root of MySQL and, exactly as I had done several times before, I attempted to create a new database.<\/p>\n<p>It only bloody worked.<\/p>\n<p>I have no explanation for why, I can&#8217;t believe that having a version deficiency in the OS would stop phpMyAdmin from writing to MySQL, however&#8230;<\/p>\n<p>Each of the two version upgrades required the NAS to be restarted, so maybe restarting the NAS was the catalyst that fixed the problem?<\/p>\n<p>The old &#8220;switch it off and switch it back on again&#8221; technique?<\/p>\n<p>If so, I&#8217;m slightly disappointed, because I thought Linux and MySQL were above such fripperies.<\/p>\n<p>But, meanwhile, back at the geek factory&#8230;<\/p>\n<p>I created a user for that newly created database, and allocated permissions and a password to it.<\/p>\n<p>I fished out the config.php file from the WordPress root, and edited in to it the details of the database and the user I had just created, filled in the password and the hostname, saved it back to the WordPress root and then, in a browser, entered the URI.<\/p>\n<p>I was expecting to see either a vanilla WordPress installation on the website or the WordPress config screen.<\/p>\n<p>Instead I got a database error.<\/p>\n<p>I fished back in to the root of WordPress, renamed the config.php to something the system wouldn&#8217;t be able to identify.<\/p>\n<p>Flipped back to the browser, entered the URI again and got the WordPress setup\/config creation page.<\/p>\n<p>I entered the details of the database\/user\/host etc and accepted the changes, and ran straight in to a vanilla WordPress installation.<\/p>\n<p>Brilliant, it worked!<\/p>\n<p>Except.<\/p>\n<p>Because I had used an old version of WordPress, the system prompted me to go and grab an upgrade.<\/p>\n<p>When I tried to run through the usual WordPress upgrade procedure I got this screen:<\/p>\n<figure id=\"attachment_9590\" aria-describedby=\"caption-attachment-9590\" style=\"width: 800px\" class=\"wp-caption alignleft\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-9590\" alt=\"confused.com\" src=\"https:\/\/brennigjones.com\/blog\/wp-content\/\/WPUpgrade-1024x372.jpg\" width=\"800\" height=\"290\" srcset=\"https:\/\/brennigjones.com\/blog\/wp-content\/uploads\/WPUpgrade-1024x372.jpg 1024w, https:\/\/brennigjones.com\/blog\/wp-content\/uploads\/WPUpgrade-300x109.jpg 300w, https:\/\/brennigjones.com\/blog\/wp-content\/uploads\/WPUpgrade-250x90.jpg 250w, https:\/\/brennigjones.com\/blog\/wp-content\/uploads\/WPUpgrade.jpg 1266w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" \/><figcaption id=\"caption-attachment-9590\" class=\"wp-caption-text\">confused.com<\/figcaption><\/figure>\n<p>The problem is, as geeks might have guessed, I haven&#8217;t used FTP anywhere in this process.<\/p>\n<p>I hadn&#8217;t even configured FTP.<\/p>\n<p>So I did the manual upgrade (downloaded the WordPress zipped package, exploded it, copied the exploded files in to the root webfolder) and then hit the refresh button.<\/p>\n<p>And got a database error.<\/p>\n<p>So I fished back in to the WordPress root, deleted the config.php, refreshed the website and, as expected, got the WordPress installation page again.<\/p>\n<p>I filled in the database, host, username etc (again) and the website loaded.<\/p>\n<p>Since then I&#8217;ve been playing with load functions, and attempting to analyse performance against user function and database activity.<\/p>\n<p>The most that I can move the needle is to get the NAS resource monitor to flick up to 4kb\/s of upload (to the web) activity, concurrently with 3kb\/s of download (from the internet) traffic.<\/p>\n<p>I don&#8217;t know how these numbers stack up in the Grand Scheme Of Things, but in my world right now, an activity ratio of 4kb\/s over 3kb\/s, on a combination of back-end and front-end utilisation is pretty encouraging.<\/p>\n<p>But it is only one website.<\/p>\n<p>Though it is loading lightningly fast!<\/p>\n<p>Anyway.<\/p>\n<p>The bottom line is that I need to investigate the FTP functionality, to allow WordPress to self-upgrade and, importantly, allow the WordPress plugins to self-upgrade too.<\/p>\n<p>But that is the only thing left to do.<\/p>\n<p>I&#8217;ve proved, with this prototype, that I can deliver what was in my head.<\/p>\n<p>I will do no more (he said, trying to sound resolute) work on this concept until after I have moved.<\/p>\n<p>But I know of a very nice pair of PowerEdge servers and a compatible rack for sale, for not much money&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well. In the best traditions of technical geekery, the next part in the exercise to self-host on a Synology Diskstation NAS was not as straightforward<\/p>\n","protected":false},"author":13,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-9589","post","type-post","status-publish","format-standard","hentry","category-stuff","two-columns"],"_links":{"self":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9589","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9589"}],"version-history":[{"count":0,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9589\/revisions"}],"wp:attachment":[{"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9589"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9589"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brennigjones.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9589"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}