Overview
If you’re hosting a WordPress website on Flywheel’s staging or pre-production environments and using htpasswd protection, you might notice that WP Umbrella isn't detecting htpasswd automatically. That's because Flywheel handles htpasswd differently, and we don’t always know where the file is located.
But we’ve got a simple solution that works every time!
Estimated Time to Complete: 5 minutes
Prerequisites:
A website hosted on Flywheel
Htpasswd protection enabled on that site
WP Umbrella plugin installed and active
Steps to Follow 
Step 1: Understand the Htpasswd Issue with Flywheel Staging and Pre-Prod 
Flywheel uses a custom method to handle htpasswd protection, which means WP Umbrella may be unable to locate your htpasswd file automatically in staging and pre-prod environments. But there’s a quick fix to ensure WP Umbrella recognizes the protection.
Step 2: Force Htpasswd Detection with a PHP Filter 
To manually tell WP Umbrella that htpasswd is active, add a simple PHP filter to your WordPress theme.
Here’s how to do it:
Open your WordPress Admin Dashboard.
Go to Appearance > Theme File Editor.
In the right sidebar, select your theme’s
functions.php
file.Add this line of code at the end of the file:
add_filter('wp_umbrella_has_htpasswd', '__return_true');
What does this do?
This filter forces WP Umbrella to recognize that htpasswd protection is in place — even if we can’t find the actual file.
Save the
functions.php
file when done.
Common Issues & Troubleshooting 
1. Will this affect my live environment?
No, this only applies to the environment where you add the filter (staging or pre-prod). You can choose not to include this line in production.
2. I’m not comfortable editing the functions.php file. What should I do?
No problem! Reach out to our support team, and we’ll guide you through it or handle it for you.
3. What if I still see errors in WP Umbrella?
Make sure you’ve saved the functions.php
file correctly and that there are no typos in the code. If everything looks good but the issue persists, contact our support for help.
4. Can I remove this line when I move to production?
Absolutely! Once you’re done testing in staging or pre-prod, you can remove this line to keep your production environment clean.
5. Does this compromise security?
Not at all. This filter simply informs WP Umbrella of htpasswd presence—it doesn’t affect your actual htpasswd settings or protection.
Final Thoughts 
With this one-line tweak, you’ve ensured that WP Umbrella recognizes htpasswd protection on Flywheel’s staging and pre-production environments.
If you run into any issues or want us to handle this for you, reach out; we’re always happy to help!