use ←↑↓→ or <SPACE>
We create and care for
Drupal-powered websites.
Minneapolis, MN (Mostly!)
Site and hosting migratiton
Drupal 8 upgrades
Site audits
Process consultantcy
...until it isn't.
Errors, breakage, malicious content
Poor performance
"It's your site now."
...but a feeling is a sign you need one.
Check if you're on the right path
Can be difficult to check in-house
...than just hope for the best.
Yes, really.
The most basic, important thing you can do!
Admin > Reports > Available Updates
Provided by the Update Manager module
May be disabled on production sites
Admin > Extend
Your site won't be a "sea of green"
Security updates, unsupported modules
Take Action ASAP!
Security updates, unsupported modules
Take Action ASAP!
Some sites break if updated!
Always ask your team first!
Overview of your site
Admin > Reports > Status
Misconfigurations
Updates required
Down connections to external services
Admin > Configuration > Development > Performance
CSS and JS files Aggregated
Page cache maximum age set*
* Most sitesDon't look for specific errors...
...look for frequency of severe errors!
dblog enabled for most sites
Admin > Reports > Recent Log Messages
Gathers data, runs best practice checks
Command Line tool for Drupal
drush en -y site_audit
drush cc drush
cd path/to/your/site
drush aa
--html
--bootstrap
--detail
--skip=insights
> path/to/report.html
Read them all!
Highest value checks in the whole report
Best performance value for small sites
Consider Page cache maximum age carefully!
Same as Update Manager and Status Report
Replaces manual steps, no login needed!
More FYI than problem-finding
Does not replace a content audit
File, code, DB sizes
Sometimes useful! Depends on your site.
Not a Drush command!
Monitors continually, pluggable notifications
Currently in beta!composer require drupal/healthcheck
Enable like any module
Admin > Reports > Healthcheck
Action-oriented, priority ordered report
Send healthchecks to your inbox
Customizable messages, full reports or criticals
Monitor how your site improves
Views-based, customizable
Shared hosting
Managed hosting (Pantheon, Acquia)
Self-managed (VPS, internal)
What was your primary motive?
Is that still true?
free
utility
Shows used, free, and available memory
$ free -h
total used free shared buff/cache available
Mem: 15Gi 3.8Gi 4.1Gi 1.7Gi 7.7Gi 9Gi
Swap: 31Gi 77Mi 31Gi
(Scroll right)
df
or "disk free" utility
Free space, not performance
$ df -h
Filesystem Size Used Avail Use% Mounted on
dev 7.8G 0 7.8G 0% /dev
run 7.8G 1.9M 7.8G 1% /run
/dev/nvme0n1p3 434G 142G 270G 35% /
/dev/nvme0n1p1 599M 42M 558M 7% /boot
top
utility
Look for idle
or id
percent
Mem: 12541644K used, 3767604K free, 1816292K shrd, 965248K buff, 6908000K cache
CPU: 1% usr 0% sys 0% nic 96% idle 0% io 0% irq 0% sirq
Load average: 0.70 0.87 0.92 4/1173 264
PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND
29 1 apache S 373m 2% 1 0% /usr/sbin/httpd -D FOREGROUND -f /
30 1 apache S 368m 2% 3 0% /usr/sbin/httpd -D FOREGROUND -f /
33 1 apache S 368m 2% 2 0% /usr/sbin/httpd -D FOREGROUND -f /
32 1 apache S 368m 2% 0 0% /usr/sbin/httpd -D FOREGROUND -f /
139 1 apache S 368m 2% 2 0% /usr/sbin/httpd -D FOREGROUND -f /
1 0 apache S 368m 2% 0 0% /usr/sbin/httpd -D FOREGROUND -f /
42 0 apache S 6244 0% 1 0% /bin/bash
263 42 apache R 1532 0% 0 0% top
(Press q
to quit)
Typically do not need auditing
Memory, disk, CPU typically auto-scaled
Typically do not need auditing
Memory, disk, CPU typically auto-scaled
D8 should always be on PHP 7!
For D7, try PHP 7, otherwise PHP 5.6
Actual 5.x to 7.x updates are rare
Better to move to new server/hosting
PHP version (x.y) should always match
Configuration may differ, but only minor
Best done through the web UI
Admin > Reports > Status
Best done through the web UI
Admin > Reports > Status
$ php --version
PHP 5.6.33 (cli) (built: Feb 7 2018 15:35:50)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
...you can outgrow your hosting.
Not malicious!
Intentional modification of core & contrib code
Expediency, lack of knowledge, bug fixes
Unaware of "offical" patching process
Compares installed core & contrib against D.O
Version aware
You use ftp (not git or CI) to deploy
You haven't updated in ages
You suspect a breach
composer require drupal/hacked
drush en -y hacked
Not your local!
Untracked, "cloaked" files
Admin > Reports > Hacked
Minor changes can flag a module
Missing READMEs, line-endings, best-practice changes
Install the diff module
Displays individual line changes
Create patch from changes, add to site repo
Post to D.O if broad benefit
Refer to the patch on D.O if posted
...but it needs to be done right
Clues that imply a hack
Common way to unpack, execute exploit code
Hacked! report, grep
utility
Look for duplicate files & modules
Use only to corroborate a hack...
...not to detect one.
The 'net isn't a clean place!
Frequent drive-by attacks are common
Breathe.
Breathe.
Better to be offline than compromised
User privacy, partner exposure, brand damage
You need a working copy to examine
Place it in an air-gapped system
Requires some sleuthing
Tie to missed module or core security release
DB, code, and files from before the hack
Be sure it isn't compromised!
Apply all security updates and patches
Copy content over manually
Avoid rebuilding a second time
Site may still be exposed in other ways
Clean up what you can
Accept risk of follow-up hacks
Really. Assume it's comprimised.
Invalidate all passwords and start over
Really. Assume it's comprimised.
Invalidate all passwords and start over
...but you can be prepared.
Restore to a clean state, then...
...apply all security updates.
Disable bad-practice modules
Best practice config changes
Disable bad-practice modules
Best practice config changes
Disable bad-practice modules
Best practice config changes
Does a DB write on each request!
Rarely needed, as other analyics are used
Executes PHP code in content
Instant security vulnerability!
Check text-formats, use of Views PHP first!
Test for breakage, then uninstall.
Confusing, causes missed updates
Can be sign of a hack
Remove, drush cr && drush updb
Test locally first!
Different tools, approaches
Time and brain intensive process
Not a fix.
...but it's not working (well) either.
Inexperience, bad assumptions, changing priorities
Inexperience, bad assumptions, changing priorities
Articles and Basic Pages everywhere
Tons of fields, not all used
Differentiation only in name, not use or data
Press Release vs. Blog Post vs. News
Do a content audit
Use card sorting to rediscover groupings
Drop old, irrelvent content
Can be done manually or using Migrate
Per-node tasks via Views Bulk Operations
Update menus, build new sections
Gives site messy, inconsistent feel
Separates content from layout
Causes gradual performance loss
Often unaware, or unintentional
Current site code unsupported
Cheaper, easier to rebuild than fix
"It's time for it."
"Rip the bandage off" approach
Enforce best practices from the start
Coodinate with a hosting change
Bring in external help on a rebuild
Outside perspective, broader experiences
Good "get to know each other" exercise
Informs better estimating
Flat pricing
Analysis and recommendations
Fast fixes bring brief benefit
Flyover Camp
socketwench.github.io/healthcheck-your-site