Fix WordPress Mixed Content Error (HTTP to HTTPS) – Complete Guide (2026)

If your WordPress site shows a “Not Secure” warning even after installing SSL, you are likely facing the Mixed Content Error. This issue occurs when your website loads some resources (images, scripts, CSS) over HTTP while the main site runs on HTTPS.
This is one of the most common issues after switching to SSL, and it can impact:
- SEO rankings
- User trust
- Website functionality
In this detailed guide, you’ll learn how to fix WordPress mixed content errors step-by-step, even if you’re not a technical expert.
What is Mixed Content in WordPress?
Mixed content happens when:
- Your site loads over HTTPS
- But some elements still load via HTTP
Example:
https://yourwebsite.com (secure)
http://yourwebsite.com/image.jpg (not secure)
Browsers block or warn about such content, causing:
- Broken images
- Missing CSS
- JavaScript issues
Types of Mixed Content
1. Passive Mixed Content
- Images
- Videos
- Audio
Less harmful but still flagged.
2. Active Mixed Content
- Scripts (JS)
- CSS files
- AJAX requests
More dangerous and often blocked completely.
Why Mixed Content Happens
Common causes include:
- Hardcoded HTTP URLs in theme files
- Old database links (before SSL)
- External scripts loaded over HTTP
- Incorrect WordPress settings
- CDN misconfiguration
Step 1: Verify SSL Installation
Before fixing anything, ensure SSL is working.
Open your site in browser:
- Look for 🔒 icon
- If not visible, SSL is not properly installed
You can also test using:
- SSL checker tools
Step 2: Update WordPress URL Settings
Go to:
Dashboard → Settings → General
Update:
- WordPress Address (URL)
- Site Address (URL)
Make sure both use:
https://
Save changes.
Step 3: Fix Mixed Content via Plugin (Easy Method)
If you want a quick fix, use an SSL plugin.
Recommended Plugin:
- Really Simple SSL
Steps:
- Install and activate plugin
- Click “Activate SSL”
- Plugin automatically:
- Updates URLs
- Fixes mixed content
- Adds redirects
Step 4: Fix URLs in Database (Permanent Solution)
Plugins are good, but for long-term stability, fix URLs in database.
Option 1: Using Plugin
Use:
- Better Search Replace
Search:
http://yourwebsite.com
Replace with:
https://yourwebsite.com
Run a dry test first, then apply.
Option 2: Using WP-CLI (Advanced Users)
Run:
wp search-replace 'http://yourwebsite.com' 'https://yourwebsite.com'
Fast and reliable.
Step 5: Fix Hardcoded URLs in Theme Files
Check these files:
- header.php
- footer.php
- functions.php
Replace:
http://
with:
https://
Step 6: Update Media Links
Sometimes images still load over HTTP.
Fix:
- Re-upload images
- Or regenerate thumbnails
You can also use plugins like:
- Regenerate Thumbnails
Step 7: Force HTTPS via .htaccess
Add this to your .htaccess file:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This ensures all traffic redirects to HTTPS.
Step 8: Fix CDN Issues
If using CDN:
- Update CDN settings to HTTPS
- Enable “Force HTTPS”
- Clear CDN cache
Step 9: Fix External Resources
Check if external scripts load over HTTP.
Example:
http://fonts.googleapis.com
Change to:
https://fonts.googleapis.com
Step 10: Scan Your Website
Use browser tools:
Chrome:
- Right click → Inspect → Console
- Look for “Mixed Content” warnings
Step 11: Clear Cache
Clear all caches:
- Browser cache
- WordPress cache plugin
- CDN cache
Common Mistakes to Avoid
- Using both HTTP and HTTPS internally
- Forgetting to update old posts
- Not clearing cache after changes
- Ignoring CDN settings
SEO Impact of Mixed Content
Mixed content can:
- Reduce Google rankings
- Affect Core Web Vitals
- Lower user trust
Fixing it improves:
- Security
- Speed
- SEO performance
Final Checklist
✔ SSL installed
✔ URLs updated to HTTPS
✔ Database links fixed
✔ Theme files updated
✔ CDN configured
✔ Redirects enabled
Conclusion
Fixing the WordPress mixed content error is essential for running a secure and SEO-friendly website. While plugins offer quick solutions, combining them with manual fixes ensures long-term stability.
Once resolved, your website will:
- Load securely
- Rank better
- Build trust with users
🎯 Final Recommendation
👉 Get optimized server setup:

