How To Quickly Install a New Drupal 8 ThemeOnce I to the mymanthemaker.com website installed, the first thing I wanted to do was install a theme to make it look nicer than the default theme (Bartik) that was put in place by the Drupal 8 installer:
In my opinion, Bartik looks terrible:
So, once I managed to get the website up and running, my next priority was to change the default theme to something more in line with my own sense of design and beauty. The first place I looked was within the Drupal 8 Administrator GUI, which gave me this enticing information:
So, like a fool, I clicked on themes and got the following from Drupal.org:
Realizing that it would take me several months (or years) to evaluate over 2,000 themes, I quickly changed my strategy and started working on How To Search for Free Drupal 8 themes with Google instead:
Here's the query I used:
And here's the result I got:
I clicked on the first hit:
And started evaluating the Free Drupal 8 Bootstrap Themes listed in the article, and I figure the following theme is most appropriate for me:
Clicking on the name brought me to a download page on drupal.org.
At the bottom of the page was the download link:
Right-click on tar.gz (141.55 KB) and selected Copy link address.
Then I navigated to the right place in the Drupal 8 Administrator GUI:
and clicked on + Install new theme.
After that, I pasted the copied link address for the theme into the appropriate spot
...and got this:
Now, there's some problems with this screen
1) It feaures a BIG RED WARNING about how the use of FTP to install a theme without an encrypted connection is insecure and dangerous.
2) It offers a Learn more link to learn about why you need security and some broad advice on how to do it, but this looks like hours and hours more work to just be able to change the appearance of a website!
3) If offers no alternatives
Yet another example of how The Drupal Experience Has Sucked For Over A Decade Now. I guess we now have to figure out How To Install A New Drupal 8 Theme Without Jumping Through Hoops.
So, let me show you How To Use the CLI To Install A Drupal 8 Theme.
Where To Put Optional Drupal 8 Themes
Drupal has a bit of a dual-personality.
One side of Drupal 8 is CORE. This is where the Drupal Core Team puts their output (however slooooooowly) so as to maintain the "standard distribution" of Drupal 8.
The other side of Drupal 8 is CONTRIBUTED. This is where everything else is put so that when Drupal Core is updated, all of your customization isn't blown away.
Obviously, Optional Drupal 8 Themes are not supposed to go in the Drupal 8 CORE area.
So, we need to figure out where to put the new theme. At the Linux Command Line Interface (CLI), you may do the following:
# find . -name themes./core/assets/vendor/jquery.ui/themes
Alright, we have a long list here, but there is only one place without the word core in its path, the themes directory immediately below the base directory of the Drupal 8 System.
So, let's go there...
# cd themes
Let's see what is in this directory, shall we?
# cat README.txt
Themes allow you to change the look and feel of your Drupal site. You can use
themes contributed by others or create your own.
WHAT TO PLACE IN THIS DIRECTORY?
Placing downloaded and custom themes in this directory separates downloaded and
custom themes from Drupal core's themes. This allows Drupal core to be updated
without overwriting these files.
DOWNLOAD ADDITIONAL THEMES
Contributed themes from the Drupal community may be downloaded at
In multisite configurations, themes found in this directory are available to
all sites. You may also put themes in the sites/all/themes directory, and the
versions in sites/all/themes will take precedence over versions of the same
themes that are here. Alternatively, the sites/your_site_name/themes directory
pattern may be used to restrict themes to a specific site instance.
Refer to the "Appearance" section of the README.txt in the Drupal root directory
for further information on customizing the appearance of Drupal with custom
Drupal 8 Best Practices dictates that the <drupal root>/themes directory have two subdirectories, /contrib and /custom. Seeing as this is "best practices", I have no idea why these directories don't already exist - except for, maybe, the continually perverse nature of the Drupal Core Team that results in making *everything* Drupal much harder than it needs to be!
No matter, let's just make this thing happen.
Create these directories and make sure that the "CentOS Trinity" is observed:
1) Are the files owned by the right user context?
2) Are the filesystem permissions no more than the minimum required to get the job done?
3) Are the Secure Linux (SELINUX) permissions no more than that required to get the job done?
Here's how I did it:
# ls -l
-rw-r--r--. 1 mymanthemaker.com mymanthemaker.com 1185 Nov 14 07:20 README.txt
# mkdir contrib
# mkdir custom
# chown mymanthemaker.com:mymanthemaker.com * -R
# ls -lZ
drwxr-xr-x. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 contrib
drwxr-xr-x. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 custom
-rw-r--r--. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 README.txt
OK, everything now seems to be in order.
Now, we return to the Drupal 8 page where the desired optional theme was, and at the bottom of the page will (still) be its download link:
Right-click on tar.gz (200.32 KB) and selected Copy link address.
Next, we enter the contrib subdirectory and download the file by typing in wget and then right-click on the terminal window
# cd contrib
# wget https://ftp.drupal.org/files/projects/newsplus_lite-8.x-1.1.tar.gz
--2019-11-20 21:06:27-- https://ftp.drupal.org/files/projects/newsplus_lite-8.x-1.1.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 126.96.36.199, 188.8.131.52, 184.108.40.206, ...
Connecting to ftp.drupal.org (ftp.drupal.org)|220.127.116.11|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 144952 (142K) [application/octet-stream]
Saving to: ‘newsplus_lite-8.x-1.1.tar.gz’
100%[======================================================================>] 144,952 --.-K/s in 0.02s
2019-11-20 21:06:27 (6.88 MB/s) - ‘newsplus_lite-8.x-1.1.tar.gz’ saved [144952/144952]
Now, extract the file so the Drupal 8 System can recognize it:
# tar -zxvf newsplus_lite-8.x-1.1.tar.gz
Next, make sure the files are owned by the right user context
# chown mymanthemaker.com:mymanthemaker.com * -R
# ls -lZ
drwxr-xr-x. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 newsplus_lite
-rw-r--r--. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 newsplus_lite-8.x-1.1.tar.gz
OK, everything seems normal. The Drupal 8 System should be able to "see" the new theme if you press F5 at the Drupal 8 Administrative GUI, and looking at the bottom of the page where all of the Uninstalled themes appear:
Click on Install and set as default to see how the site looks!
If the change is a success, you will see this:
Surfinig to the home page now gives this:
P.S. I have since installed a FREE theme called Likeable, which I find even better!