Drupal 8 Basics

Okay, here's how I do it... ymmv. I host my own site, well, I pay a company for a virtual machine upon which I have set up a LAMP stack. And that is where this website lives. This means I use SSH and SFTP, and I know a bit of Unix. I know, oooh.

Let me be clear; this is not ideal. This is not for those who use Composer or Drush or have a nice host that does it for you or allows you to just click a button and everything is peachy. This site is a personal site. Nearly nobody looks at it. I installed it the old fashioned way, by uploading the tar file, extracting it, creating a database and a user, granting that user privileges, updating a bunch of random php add-ons, editing the dir.conf file to serve .php files before .html files, making the files/ directory in sites/default/files/, setting up my server config files, adding a certbot using Let's Encrypt to add a certificate, restarting apache, and jumping through whatever hoops Drupal prompted me to jump through in order to get it up and running. I know, it sounds like a pain in the ass, and it is. But it was faster than dealing with the a. hideous mess of official documentation and b. figuring out how to install and utilize Composer and/or new Drush. I tried. I tried SO MUCH. I had managed it before... but it's like growing basil; sometimes for no apparent reason, it just doesn't work. I end up with a heap of files on my server that I can't seem to get rid of. I get responses like, you've already got that installed! Then I try to run the command... that is not installed! Okay then, go to hell. 

DISCLAIMER: NOT FOR PRODUCTION SITES
(obviously, because this breaks your site and/or module, if briefly)


UPDATING DRUPAL 8 CORE via shell

cd to the web root, then: wget https://www.drupal.org/download-latest/tar.gz

Extract it right there: tar xvfz drupal-x.x.x.tar.gz

Then, right there in the web root, like a brazen hussy, I remove the following:

rm -rf core/
rm -rf vendor/
rm *.*
rm .*


cd into the core update directory: cd drupal-x.x.x/

mv up all the new versions of the things just removed from the web root.

mv core/ ..
mv vendor/ ..
mv *.* ..
mv .* ..

If you are not currently logged in to the administrative interface, you'll need to change the settings.php file $update_free_access to "TRUE" (temporarily) in order to do the following, otherwise, proceed.

Go to https://yourdomain.com/update.php and follow the prompts.

Delete the lifeless husk of the drupal directory that had the core update rm -rf drupal-x.x.x/ and the no-longer-needed tar file, rm tar.gz.

Hasn't failed me yet. YMMV. Highly recommend testing it first in some non-production environment after making nice backups.


UPDATING A MODULE via shell

cd /modules/contrib

Use wget to bring the module update tar file into modules/contrib/.

Remove the current directory of the module that needs to be updated.

rm some_module_directory/

Extract the tar file. (This should produce a directory with the appropriate module name, if not, rename the directory as it was before.)

tar xvfz SOME_MODULE-8.x-1.2.tar.gz

Remove tar file.

rm SOME_MODULE-8.x-1.2.tar.gz

Go to https://yourdomain.com/update.php and follow the prompts. 

And! Don't forget to change the settings.php file $update_free_access back to "FALSE".