انتقل إلى المحتوى

الدروس استكشاف الأخطاء وإصلاحها مبتدئ1 دقائق قراءة

How to Fix Mixed Content Warnings After Moving to HTTPS

Your site has SSL but the padlock is missing or broken. Find resources loaded over http:// and update them so every page loads securely.

بواسطة فريق تحرير ZSOLNET آخر تحديث

هذه الصفحة غير متاحة بالعربية بعد، لذا تُعرض بالإنجليزية.

أهم النقاط

  • Mixed content is http:// resources on an https:// page.
  • The browser console lists every insecure URL.
  • Use a serialisation-safe search and replace to update URLs in the database.

Mixed content happens when a page loaded over https:// pulls in images, scripts or stylesheets over plain http://. Browsers block insecure scripts outright and mark the page as not fully secure.

Find the insecure resources

  1. Open the page, press F12 and look at the Console. Each mixed-content warning lists the exact URL.
  2. Most come from hard-coded http:// links in content, theme settings or widgets.

Fix them

Update your site URL

In WordPress, set both addresses in Settings → General to https://.

Replace old URLs in the database

Posts and settings store full URLs. Use a search-and-replace tool that handles serialised data — for example WP-CLI:

wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid --dry-run
wp search-replace 'http://example.com' 'https://example.com' --skip-columns=guid

Run with --dry-run first, and back up the database before the real run.

Fix theme and code references

Change hard-coded http:// URLs in theme files and custom code. For your own domain, a root-relative path (/images/logo.png) avoids the problem entirely.

Third-party resources

If an external service only offers http://, find an HTTPS alternative or host the file yourself.

Belt and braces

Add a header that tells browsers to upgrade any remaining insecure requests:

Header always set Content-Security-Policy "upgrade-insecure-requests"

Treat this as a safety net, not a replacement for fixing the URLs.

شارك X LinkedIn Facebook

الدخول إلى حسابك

أدِر نطاقاتك واستضافتك وفواتيرك من مكان واحد.

اتصال آمن مباشرة مع منطقة العملاء في ZSOLNET.

افتح لوحة تحكم ZSOLNET

ليس لديك حساب؟