Filed under: trellis
Trellis Tutorials
30 cases on file
Provisioning, deploying and maintaining WordPress sites on Roots Trellis: setup, migrations, cron, mail, security and troubleshooting.
-
Case No. — Security Documented
Locked Out of WordPress: Create a Temporary Admin With WP-CLI Over SSH, Then Delete It
A lost admin password, a plugin that broke the login, an admin email that no longer exists: when you cannot log in but you can reach the server, WP-CLI gets ...
-
Case No. — Debugging Shipped
My Block Theme Template Changes Are Ignored: Find and Remove the Site Editor's Database Override With WP-CLI
I changed a pattern file in a block theme, flushed the cache, and the front end kept showing the old markup. Editing the template’s .html file did nothing ei...
-
Case No. — Security Documented
A Weekly and Monthly Security Routine for Trellis WordPress Sites: fail2ban, Scans, and Checking IPs Against AbuseIPDB Before You Block Them
Security on a Trellis site comes in layers, and each layer needs a little attention on a schedule. None of it takes long. What goes wrong is that nobody chec...
-
Case No. — Performance Documented
Browser Caching Headers on Trellis With One Global Nginx Include (and Why Long Expiry Needs Versioned Assets)
PageSpeed’s “serve static assets with an efficient cache policy” warning has a boring fix: tell the browser it may keep images, fonts, CSS and JS for a long ...
-
Case No. — Performance Documented
Serve WebP and AVIF from Nginx on Trellis Without Touching the HTML: Accept-Header Negotiation for Bedrock Uploads
There are two ways to get WebP onto a WordPress site. One rewrites the HTML, so every <img> points at a .webp. The other leaves the HTML alone and lets...
-
Case No. — Security Documented
A Permanent Nginx Deny List on Trellis: When It Beats fail2ban, CIDR Ranges, and How Not to Lock Yourself Out
fail2ban is the right default: it detects an attacker, bans the address for a while, and needs no upkeep. Its weakness is that a ban expires and a rotating a...
-
Case No. — Security Documented
Two WordPress Malware Scanners and Checksum Verification: What Each One Catches, and How to Run Them on Any Host
A WordPress malware scan has to do two opposite things: be sensitive enough to catch an eval(base64_decode(...)) in a theme file, and quiet enough that you s...
-
Case No. — Devops Documented
The OOM Killer Kept Killing php on a Trellis Server, and It Was Not PHP-FPM (Cron and the Unlimited PHP CLI Memory Limit)
A 4GB WordPress and WooCommerce server on Trellis was having processes killed. The reflex is to blame PHP-FPM, because that is where the memory usually goes....
-
Case No. — Devops Documented
Trellis Provision Tags Cheat Sheet, and the PHP Upgrade That Breaks Deploys If You Skip the users Tag
trellis provision production runs every role on the server. It is the right command after a big change and the wrong one for a small one: it takes a long tim...
-
Case No. — Devops Documented
Updating Trellis Without Losing Your Vault, Site Config and Custom Roles: A Backup, Diff and rsync-with-Excludes Routine
Trellis lives inside your project, not as a dependency, so there is no composer update for it. The trellis/ directory is a copy of the upstream repository th...
-
Case No. — Devops Documented
Cloning an Existing Trellis and Bedrock Project and Getting It Running Locally: Vault Password, VM, Provision, Pull from Production
You have a Trellis and Bedrock project in a Git repository and a Mac that is ready for Trellis. The steps between git clone and a working site at https://you...
-
Case No. — Devops Documented
Setting Up a New Mac for Trellis Development: What Runs on the Host, What Runs in the Lima VM
The question I get most about a Trellis setup is whether you need PHP, Composer, Node and MySQL on your Mac if WordPress runs in a virtual machine anyway. Th...
-
Case No. — Development Documented
Creating WordPress Pages from Block Markup with WP-CLI on Trellis: VM First, Production Second, and the .test URLs That Follow You
Building a page in the block editor and building it from a file are different workflows, and the second is better when you want the page in version control, ...
-
Case No. — Devops Documented
Migrating Several WordPress Sites onto One Trellis Server: Configure Everything First, and the Pitfalls That Bite
Trellis can host many WordPress sites on one server, and moving three sites over is not three times the work of moving one. Most of the first migration is le...
-
Case No. — Devops Documented
Testing a Trellis Migration Before DNS: /etc/hosts, a Self-Signed Certificate, and the Let's Encrypt Cutover
The site is deployed on the new Trellis server, the database and uploads are in. You still cannot look at it with the real domain, because DNS points at the ...
-
Case No. — Devops Documented
Migrating a WordPress Site from Shared Hosting to Trellis and Bedrock: The Order That Works
Moving a site from shared hosting, Plesk or cPanel onto a Trellis server running Bedrock is mostly a question of order. Each step is small. Doing them out of...
-
Case No. — Development Documented
WooCommerce Product Attributes and Variations with WP-CLI on Trellis: Why Your Terms Land on the Wrong Site
Setting up a WooCommerce catalogue by hand means clicking through Products, Attributes, Configure terms, once per value. With WP-CLI you can create the attri...
-
Case No. — Debugging Shipped
My Trellis Nginx Redirect Did Nothing: The Wrong Provision Tag, and a 301 That Drops the Query String
I moved a blog post to another domain and added a 301 for the old URL to the site’s Nginx redirect file in Trellis. I committed it, ran a provision, and the ...
-
Case No. — Devops Documented
Scheduled Posts Go Live Up to 15 Minutes Late on Trellis: WP-Cron Is Off, and the Interval Is a Site Setting
On a Trellis site, a post scheduled for 09:00 can appear at 09:12. Nothing is broken. Trellis turns WP-Cron off and runs the due events from system cron inst...
-
Case No. — Debugging Documented
Trellis Provision Fails at "Set root user password": The Password Is Fine, MariaDB Isn't Running (provider_bzip2.so)
A Trellis provision stopped in the MariaDB role with this:
-
Case No. — Debugging Documented
WordPress Mail Not Arriving on Trellis: Two Different Failures That Look the Same (Config Reset vs Bounces)
“WordPress emails aren’t arriving” has at least two unrelated causes on a Trellis server, and they need opposite fixes. In one the mail never leaves the serv...
-
Case No. — Security Shipped
fail2ban for wp-login.php on Trellis: Turn the Jail On, Anchor the Filter, Keep an Nginx Deny List for the Rest
One IP address tried to log in to /wp-login.php 1,420 times in two months on a production Trellis server. Two more tried 860 and 742 times, and over 40 other...
-
Case No. — Debugging Documented
Renamed a WordPress Multisite Subsite and WP-CLI Still Shows the Old Slug: A Site Path Is Cached Infrastructure
I renamed a subdirectory subsite on a Multisite network from /fintech/ to /kafe/. I changed the path in the database and expected that to be the end of it. I...
-
Case No. — Devops Shipped
Refreshing Three Local WordPress Sites From Production Without Leaving .com URLs Behind
Every few weeks my local copies drift from production far enough that I stop trusting them: stale content, missing uploads, a plugin version that no longer m...
-
Case No. — Security Shipped
wp-ops malware-scan: Checking a Remote WordPress Site Without Leaving Anything Behind
Malware scanning a WordPress site you can only reach over SSH used to mean a small ritual: scp the scanner script up to /tmp, run it, and remember to delete ...
-
Case No. — Devops Shipped
The Seven Commands I Actually Run Every Day (And Why I Stopped Memorizing Them)
For a long time, my daily WordPress ops routine lived in shell history. Pull a database, sync some uploads, eyeball a security log, glance at a client site’s...
-
Case No. — Devops Shipped
Splitting a Sage Theme From Its Trellis Deploy: Nynaeve as a Composer Package
Our Sage 11 theme, Nynaeve, used to live two places at once: as its own standalone repo, and as a plain git-tracked copy pasted into the main site repo’s web...
-
Case No. — Security Hardened
WP 2FA on Roots Bedrock/Trellis: Per-Environment Encryption Keys and a Composer Patch for a Fatal Bug
We added WP 2FA (two-factor authentication) to a client site this week to help lock down /wp-login.php after a brute-force wave that hit us — 20 IPs, 176 to ...
-
Case No. — Devops Patched
How Trellis's database-pull Playbook Works (And What We Fixed)
One of the most useful Trellis commands in day-to-day WordPress development is trellis db pull. It syncs your production (or staging) database down to local ...
-
Case No. — Debugging Resolved
Debugging PHP-FPM Memory Exhaustion on WordPress with WooCommerce and Trellis
Over the past weekend, I spent considerable time debugging persistent memory exhaustion errors on a WordPress site running WooCommerce and the Roots stack (T...