SSL WordPress - konfiguracja HTTPS krok po kroku
SSL (HTTPS) to dziś standard - bez niego Chrome pokazuje "Niezabezpieczone", Google obniża pozycje. Na szczęście certyfikaty są darmowe (Let's Encrypt), a konfiguracja WordPress zajmuje kilka minut.
Krótka odpowiedź
1) Zainstaluj certyfikat Let's Encrypt (panel hostingu),
2) Zmień WordPress Address i Site Address na https://,
3) Przekierowanie http→https w .htaccess,
4) Napraw mixed content. Wtyczka Really Simple SSL automatyzuje cały proces.
Instalacja certyfikatu SSL
Let's Encrypt (darmowy):
cPanel:
1. Security → Let's Encrypt / SSL
2. Issue certificate dla domeny
3. Auto-renewal enabled
4. Gotowe w 1 minutę
CloudPanel:
- Site → SSL/TLS
- Let's Encrypt → Issue
Cloudways:
- Application → SSL Certificate
- Let's Encrypt → Install
Cloudflare (jeśli używasz):
- SSL/TLS → Full (Strict)
- Wymaga certyfikatu na serwerze lub Cloudflare origin cert
Płatne certyfikaty:
- Dla banków, e-commerce (EV)
- Zielony pasek z nazwą firmy
- Większość nie potrzebuje
Konfiguracja WordPress
Zmiana adresów:
1. Settings → General
2. WordPress Address (URL): https://...
3. Site Address (URL): https://...
4. Save
Lub przez wp-config.php:
```php
define('WP_SITEURL', 'https://twoja-strona.pl');
define('WP_HOME', 'https://twoja-strona.pl');
```
Force SSL:
```php
define('FORCE_SSL_ADMIN', true);
```
Przekierowanie .htaccess:
```apache
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
```
Really Simple SSL (wtyczka)
Instalacja:
- Wtyczki → Really Simple SSL
- Aktywuj
- Kliknij "Activate SSL"
Co robi automatycznie:
- Zmienia URL-e na https
- Przekierowanie http → https
- Naprawia część mixed content
- HSTS header (opcjonalnie)
Zalety:
- Jeden klik
- Bez edycji plików
- Działa dla większości
Wady:
- Zależność od wtyczki
- Lepiej zrobić ręcznie (czyściej)
- Ale dla szybkości OK
Mixed Content - naprawianie
Co to mixed content:
- Strona https ładuje zasoby przez http
- Obrazki, skrypty, style
- Przeglądarka blokuje lub ostrzega
Diagnoza:
- F12 → Console
- Szukaj: "Mixed Content"
- Lub: Why No Padlock? (online tool)
Naprawianie:
1. Database search-replace:
```bash
wp search-replace 'http://twoja-strona.pl' 'https://twoja-strona.pl' --all-tables
```
2. Better Search Replace (wtyczka):
- Szukaj: http://twoja-strona.pl
- Zamień na: https://twoja-strona.pl
- Run
3. Zewnętrzne zasoby:
- Zmień http:// na https:// lub //
- Lub pobierz lokalnie