Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
Puchar WPB
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

Jak zabezpieczyć twoją stronę WordPress za pomocą SSL

Uwaga redakcyjna: Otrzymujemy prowizję z linków partnerskich na WPBeginner. Prowizje nie mają wpływu na opinie i oceny naszych redaktorów. Dowiedz się więcej o Proces redakcyjny.

W przeszłości pokazaliśmy kilka technik, w których wymagane jest użycie certyfikatu SSL do zabezpieczenia twojej strony (stron) WordPress. Najpopularniejszą z nich jest tworzenie formularza darowizny dla organizacji non-profit w WordPress. Wiele organizacji non-profit lubi korzystać z Authorize.Net, co wymaga od nich posiadania zabezpieczonej strony (https://). W tym artykule pokażemy ci krok po kroku, jak zabezpieczyć twoje strony WordPress za pomocą SSL.

Pierwszą rzeczą, którą musisz zrobić, jest uzyskanie i skonfigurowanie certyfikatu SSL. Możesz zapytać swojego hosta, czy ma już dla ciebie dostępny certyfikat SSL. Niektórzy zapewniają certyfikat SSL wraz z kontem hostingowym (na przykład HostGator Business Plan użyj kuponu„wpbeginner„, aby rozpocząć za 0,01 USD za pierwszy miesiąc). Jeśli Twój hosting nie jest domyślnie dostępny, zapytaj go, czy ma taką usługę jako płatną (większość ma). Może to wynosić od 50 do 200 USD rocznie. Najtańszą, jaką znaleźliśmy, było uzyskanie jej za pośrednictwem GoDaddy za 12,99 USD / rok. Wadą tego rozwiązania jest to, że można go używać tylko w 1 domenie i domyślnie nie ma opcji symboli wieloznacznych. Nie można więc mieć subdomeny, takiej jak store.xyz.com i używać jej również tam. Aby skonfigurować certyfikat SSL na serwerze, po prostu podaj dane swojej firmie hostingowej, a ona zrobi to za Ciebie.

Gdy certyfikat SSL jest już gotowy do użycia na twoim serwerze, teraz musimy zaimplementować go w WordPressie. Najprostszym sposobem jest zainstalowanie i włączanie wtyczki WordPress HTTPs. Po jej włączaniu należy przejść do menu Ustawienia ” WordPress HTTPS. Wpisz nazwę hosta SSL, która będzie nazwą twojej domeny. Następnie zaznacz pole Force SSL Exclusively. Zasadniczo oznacza to, że tylko kilka stron w witrynie będzie HTTPS, pozostałe zostaną przekierowane na HTTP (normalne). Możesz wymusić SSL na administracji, jeśli chcesz, ale nie jest to wymagane.

WordPress HTTPs

Teraz przejdźmy do karty Strony w panelu administracyjnym WordPress. Wybierz stronę, na której chcesz mieć certyfikat SSL (najprawdopodobniej twoja strona kasy, darowizny itp.). Kliknij, aby edytować tę stronę. Tuż nad przyciskiem publikowania znajduje się nowe pole wyboru Wymuś SSL.

Force SSL in WordPress

Po prostu zaznacz to pole i kliknij opublikuj/aktualizuj. Twoja nowa strona będzie teraz zabezpieczona. Upewnij się, że w przeglądarce Google Chrome pojawi się mały zielony znak.

Chrome SSL Error

Zasadniczo, jeśli zielony znak znajduje się obok twojego adresu URL, to gotowe. Powinieneś teraz przestać czytać ten artykuł. Jeśli widzisz żółty lub czerwony znak, kontynuuj czytanie artykułu.

Jak naprawiono elementy inne niż SSL na stronie SSL

Google Chrome pokazuje żółtą lub czerwoną ikonkę, jeśli widzi potencjalne zagrożenie na witrynie. Firefox jest najgorszy, ponieważ wyświetla komunikat o błędzie ostrzegający użytkownika. Nie jest to dobre dla reputacji twojej witryny internetowej (szczególnie strony darowizn organizacji non-profit). Kiedy widzisz żółty lub czerwony komunikat, oznacza to, że masz niezabezpieczoną treść na zabezpieczonej stronie. Oznacza to, że możesz mieć obrazki i skrypty, które są http:// zamiast https://. Być może zastanawiasz się, dlaczego tak się dzieje? Zasadniczo, jeśli wstawiłeś obrazek na swoją stronę darowizny za pośrednictwem WordPressa, masz obrazy na panelu bocznym (ikonki społecznościowe), masz skrypty mediów społecznościowych (facebook like box) lub inny rodzaj elementu multimedialnego, to twoja strona ma niezabezpieczoną treść. Szybką poprawką będzie użycie wtyczki iThemes Fix SSL/Non-SSL Links.

Ta wtyczka po prostu zmieni wszystkie żądania http:// na stronie na żądania https://. Spowoduje to wzrost wczytywania serwera, ale nie będzie on wystarczająco znaczący.

Ważne jest, aby pamiętać, że ta wtyczka nie zmienia niczego, co dodajesz ręcznie (tj. facebook jak iFrame w panelu bocznym itp.). Powinieneś po prostu mieć te z https:// tak czy inaczej. Ta wtyczka dba o wszystkie skrypty wczytywane w nagłówku i tym podobne. Wtyczki, które nie są poprawnie zakodowane, będą powodować problemy. Poprawki są wprowadzane indywidualnie.

Mamy nadzieję, że ten artykuł okazał się pomocny. Jeśli masz jakieś pytania, zostaw komentarz poniżej.

Ujawnienie: Nasze treści są wspierane przez czytelników. Oznacza to, że jeśli klikniesz na niektóre z naszych linków, możemy otrzymać prowizję. Zobacz jak WPBeginner jest finansowany, dlaczego to ma znaczenie i jak możesz nas wspierać. Oto nasz proces redakcyjny.

Avatar

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

Najlepszy zestaw narzędzi WordPress

Uzyskaj BEZPŁATNY dostęp do naszego zestawu narzędzi - zbiór produktów i zasobów związanych z WordPressem, które każdy profesjonalista powinien mieć!

Reader Interactions

34 komentarzeZostaw odpowiedź

  1. Syed Balkhi says

    Hey WPBeginner readers,
    Did you know you can win exciting prizes by commenting on WPBeginner?
    Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
    You can get more details about the contest from here.
    Start sharing your thoughts below to stand a chance to win!

  2. THANKGOD JONATHAN says

    I am a little confused here. Is setting up SSL for the main site and for pages different?
    I mean do I need to set up SSL for my site and also set up for pages again differently?

    • WPBeginner Support says

      This is one of our older articles, it is better to set up SSL for the entire site.

      Administrator

  3. Zaid Sparrow says

    I’m using SSL on my WordPress and i created a sub domain but i dont know why it’s redirecting sub domain to main website?

  4. Saurabh says

    With premium SSL by godaddy statndard SSL certificate comes free.So may I know what actually is the difference.For e-commerce website should I use it only on checkout page or it can be used for all pages ?

  5. ThirstyJon says

    This plugin author has not updated the plugin since March of 2013.

    I noticed in the support forum for the https plugin that several people (including me) are having a problem with the plugin forcing the search form to be insecure.

    This causes a note in Google Chrome that a form on the page is not secure.

    Who is going to shop on a site that says a „form” is insecure?

    The https plugin has a function that forces all pages that are not set to ssl to be non-ssl.

    This is handy because I have at least one page on my site that will not work if the page is forced to ssl.

    So I have to choose between having the search form OR having the one page work.

    I am wondering if there is another plugin you could recommend that is actually kept up to date?

  6. Jason C. says

    how about changing the images that are unsecure manually instead of using a plugin? I’ve done it before, but can’t for the life of me remember how I did it.

  7. Fahad M Rafiq says

    After the Google announced that SSL is now a ranking factor. Everyone is rushing towards moving their website to HTTPS.

    But most people do not realize there are many things people forget to do, like for example blocking HTTP pages from indexing and submitting HTTPS website to Google Webmaster tools again.

  8. Jeff Dworkin says

    I am trying to use the bluehost Free Shared SSL Certificate.

    I get a 404 error on any page that I for which I click „Secure Post”

    Does anyone have any idea about what I may have set up incorrectly.

  9. lbbb2 says

    what happens if the plugin is causing a redirect loop. I checked all my plug ins and the wordpress https was what is causing it am i using it too much or am I using it wrong I followed all of the instructions and still loops.

    • Tom says

      What was the time lapse between you getting your SSL cert and you installing the plugin? I had this same issue when I had purchased the SSL cert the time lapse between me going to sleep and getting up in the morning had rectified the problem.

      I believe this has something to do with your hosting company setting up your domain with an SSL cert.

      TLDR: Allow time for your cert to be correctly set up as it access CNAME records to do this which can cause issues.

  10. Allen Resha says

    So I used this plugin. It works great, except my blog 404’s when I use any permalink structure other than default. All other pages work fine. If I take the Force SSL off of my home page and blog, it fixes the problem, but I want my homepage and my blog page (that lists my posts) to be secure.

    What do you suggest? Help would be appreciated. I am testing on my site (which is being rebuilt), but I need it on a site for a social good project. This is really holding back my process! Your help would be greatly appreciated. I will show you much Twitter/Facebook/Google + and any kind of love you need! :)

  11. Danny says

    I added the plugin as well as the Fix Non-SSL plugin and I still get the insecure data warning. Any suggestions?

  12. Ariel Frailich says

    Hi! If memory serves (it’s been years), when you install a cert, you specify a folder to be secure. For WP, is this folder in the WP path or outside of it, and if outside, what has to be moved into it? Or should SSL be set up to include the whole site? Thank you for any info (or link to such) !

    • Editorial Staff says

      You are getting this error because your SSL certificate is not trusted. Where did you purchase the SSL from? Are you sure that it is properly installed. Just purchasing the certificate doesn’t do anything. You have to make sure that it is installed on your server as well.

      Administrator

  13. RichardC says

    Excellent post!
    Too bad the plugin author can’t be bothered to write any docs.
    Let’s hope he reads this article and asks permission to use it as the seed for a manual.
    Good Job to Staff on this Article!!

  14. Jon Tobey says

    I installed the plug in, but when I go to a page, I don’t see the „force SSL” box. However, I do see an HTTPS box below the Page Attributes button. Has the UI changed?

  15. dalee says

    Is there a way to automatically do this? example using wp_insert_post() function then make the added post secure? without manually checking the checkbox?

  16. Yogi says

    Thank you for the information. I was going to do the old ways by using .htaccess, but this definitely saves me tons of time.

  17. Joshua says

    Thanks for the article. You really saved my butt. I could not figure the SSL out for the life of me. But after reading this I was able to get it working in 5min. High Five!

  18. wmwebdes says

    I’ve just started looking at SSL certificates.
    A client asked if I could set them up an eCommerce site, which I understand requires SSL for bank account details etc.
     
    Thanks for a timely article.

Zostaw odpowiedź

Dziękujemy za pozostawienie komentarza. Pamiętaj, że wszystkie komentarze są moderowane zgodnie z naszymi polityka komentarzy, a Twój adres e-mail NIE zostanie opublikowany. NIE używaj słów kluczowych w polu nazwy. Przeprowadźmy osobistą i konstruktywną rozmowę.