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 prawidłowo przenieść WordPress z HTTP na HTTPS (przewodnik dla początkujących)

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.

Czy chcesz przenieść WordPress z HTTP na HTTPS i zainstalować certyfikat SSL na twojej witrynie internetowej?

Otrzymaliśmy wiele zapytań na ten temat, ponieważ Google ogłosiło w lipcu 2018 r., że przeglądarka Chrome będzie oznaczać wszystkie witryny internetowe bez SSL jako niezabezpieczone.

W tym artykule pokażemy, jak prawidłowo przenieść WordPress z HTTP na HTTPS poprzez dodanie certyfikatu SSL.

Moving WordPress from HTTP to HTTPS / SSL

Nie martw się, jeśli nie masz pojęcia, czym jest SSL lub HTTPS. Wyjaśnimy to również.

Co to jest HTTPS?

HTTPS lub Secure HTTP to metoda szyfrowania, która zabezpiecza połączenie między przeglądarką użytkownika a twoim serwerem. Utrudnia to hakerom podsłuchiwanie połączenia.

Każdego dnia udostępniamy nasze dane osobowe różnym witrynom internetowym, czy to dokonując zakupu, czy po prostu logując się.

Aby zabezpieczyć transfer danych, należy utworzyć bezpieczne połączenie.

Wtedy właśnie pojawiają się SSL i HTTPS.

Każda witryna otrzymuje unikatowy certyfikat SSL w celu identyfikacji. Jeśli serwer udaje, że korzysta z protokołu HTTPS, a jego certyfikat nie jest zgodny, większość nowoczesnych przeglądarek ostrzega użytkownika przed połączeniem się z witryną internetową.

Connection not private error in Google Chrome

Teraz pewnie zastanawiasz się, dlaczego muszę przenieść moją witrynę WordPress z HTTP na HTTPS, zwłaszcza jeśli jest to prosty blog lub witryna internetowa małej firmy, która nie pobiera żadnych płatności.

Dlaczego potrzebujesz HTTPS i SSL?

W 2018 roku Google ogłosiło plan poprawy ogólnego zabezpieczenia sieci poprzez zachęcanie właścicieli witryn internetowych do przejścia z protokołu HTTP na HTTPS. W ramach tego planu ich popularna przeglądarka internetowa Chrome oznaczałaby wszystkie witryny internetowe bez certyfikatu SSL jako „Niezabezpieczone”.

Connection not secure

Google stwierdziło również, że witryny internetowe z SSL również odniosą korzyści SEO i uzyskają wyższe rankingi wyszukiwania niż witryny niezabezpieczone. Od tego czasu wiele witryn internetowych przeszło z protokołu HTTP na HTTPS.

Po ogłoszeniu, Google rozpoczęło wdrażanie ostrzeżenia „Not Secure” w Chrome. Na przykład, jeśli ktoś przejdzie na witrynę internetową HTTP przy użyciu okna incognito, zostanie ona oznaczona jako Niezabezpieczona. Jeśli ktoś przejdzie na stronę HTTP w zwykłym trybie i spróbuje wypełnić formularz kontaktowy lub inny formularz, witryna internetowa zostanie oznaczona jako niezabezpieczona.

Kiedy twoi czytelnicy i klienci widzą to powiadomienie, daje im to złe wrażenie o twojej firmie.

Dlatego wszystkie witryny internetowe muszą natychmiast przejść z HTTP na HTTPS i zainstalować SSL.

Nie wspominając już o tym, że jeśli chcesz akceptować płatności online na swojej witrynie internetowej e-handel, potrzebujesz SSL.

Większość firm płatniczych, takich jak Stripe, PayPal Pro, Authorize.Net itp., będzie wymagać bezpiecznego połączenia przed zaakceptowaniem płatności.

Używamy SSL dla naszych witryn internetowych, w tym WPBeginner, OptinMonster, WPForms i MonsterInsights.

Wymagania dotyczące korzystania z HTTPS/SSL na witrynie WordPress

Wymagania dotyczące korzystania z SSL w WordPress nie są zbyt wysokie. Wszystko, co musisz zrobić, to kupić certyfikat SSL, a być może masz go już za darmo.

Najlepsze firmy hostingowe WordPress oferują darmowe certyfikaty SSL dla wszystkich swoich użytkowników:

Więcej szczegółów można znaleźć w naszym przewodniku na temat tego, jak uzyskać bezpłatny certyfikat SSL dla twojej witryny internetowej WordPress.

Jeśli twoja firma hostingowa nie oferuje bezpłatnego certyfikatu SSL, musisz go zakupić.

Zalecamy korzystanie z Domain.com, ponieważ oferują najlepszą ofertę SSL zarówno dla zwykłych, jak i wieloznacznych certyfikatów SSL.

Kupując u nich certyfikat SSL, otrzymujesz również pieczęć TrustLogo dla Twojej witryny internetowej, a każdy certyfikat SSL jest objęty minimalną gwarancją zabezpieczenia w wysokości 10 000 USD.

Po zakupie certyfikatu SSL należy poprosić dostawcę hostingu o jego zainstalowanie.

Konfiguracja WordPressa do korzystania z SSL i HTTPS

Po włączeniu certyfikatu SSL dla twojej domeny, będziesz musiał skonfigurować WordPressa tak, aby używał protokołów SSL i HTTP na twojej witrynie internetowej.

Pokażemy ci dwie metody, aby to zrobić i możesz wybrać tę, która najlepiej odpowiada twoim potrzebom.

Film instruktażowy

Subscribe to WPBeginner

Jeśli wolisz pisemne instrukcje, czytaj dalej

Metoda 1: Konfiguracja SSL/HTTPS w WordPress przy użyciu wtyczki

Ta metoda jest łatwiejsza i zalecana dla początkujących.

Najpierw należy zainstalować i włączyć wtyczkę Really Simple SSL. Aby uzyskać więcej informacji, zobacz nasz przewodnik krok po kroku, jak zainstalować wtyczkę WordPress.

Po włączaniu należy przejść na stronę Ustawienia ” SSL. Wtyczka automatycznie wykryje twój certyfikat SSL i skonfiguruje witrynę WordPress do korzystania z protokołu HTTPS.

SSL enabled on a WordPress website

Wtyczka zajmie się wszystkim, w tym błędami związanymi z mieszaną treścią. Oto, co wtyczka robi za kulisami:

  • Sprawdź certyfikat SSL
  • Ustawienie WordPressa tak, by używał https w adresach URL
  • Konfiguracjaprzekierowań z HTTP na HTTPS
  • Poszukaj adresów URL w twojej treści, które wciąż są wczytywane z niezabezpieczonych źródeł HTTP i spróbuj je poprawić.

Uwaga: Wtyczka próbuje poprawiać błędy mieszanej treści przy użyciu techniki buforowania wyjściowego. Może to mieć negatywny wpływ na wydajność, ponieważ zastępuje treść na witrynie podczas wczytywania strony. Wpływ ten jest widoczny tylko przy pierwszym wczytywaniu strony i powinien być minimalny, jeśli używasz pamięci podręcznej wtyczki.

Chociaż wtyczka mówi, że możesz zachować SSL i bezpiecznie wyłączać wtyczkę, nie jest to w 100% prawdą. Będziesz musiał pozostawić wtyczkę aktywną przez cały czas, ponieważ wyłączanie wtyczki spowoduje powrót błędów mieszanej treści. Więcej szczegółów można znaleźć w naszej recenzji Really Simple SSL.

Metoda 2: Ręczna konfiguracja SSL/HTTPS w WordPress

Ta metoda wymaga ręcznego rozwiązywania problemów i edytowania plików WordPress. Jest to jednak trwałe i bardziej zoptymalizowane pod kątem wydajności rozwiązanie, z którego korzystamy na WPBeginner.

Jeśli uważasz, że ta metoda jest trudna, możesz zatrudnić programistę WordPress lub skorzystać z pierwszej metody.

W ramach tej metody może być konieczna edycja motywu WordPress i plików kodu. Jeśli nie robiłeś tego wcześniej, zapoznaj się z naszym przewodnikiem na temat kopiowania i wklejania fragmentów kodu w WordPress.

Najpierw należy przejść na stronę Ustawienia ” Ogólne. W tym miejscu należy zaktualizować twoje pola adresu URL WordPress i witryny, zastępując http na https.

Update WordPress URLs

Nie zapomnij kliknąć przycisku „Zapisz zmiany”, aby zapisać twoje ustawienia.

Po zapisaniu ustawień WordPress wyloguje cię i zostaniesz poproszony o ponowne zalogowanie.

Następnie musisz skonfigurować przekierowania WordPress z HTTP na HTTPS, dodając następujący kod do twojego pliku .htaccess:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>

Jeśli korzystasz z serwerów NGINX, będziesz musiał dodać następujący kod, aby przekierować z HTTP na HTTPS w twoim pliku konfiguracyjnym:

server {
listen 80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}

Nie zapomnij zastąpić example.com nazwą twojej domeny.

Wykonując te kroki, unikniesz błędu WordPress HTTPS nie działa, ponieważ WordPress będzie teraz wczytywać całą twoją witrynę internetową za pomocą HTTPS.

Jeśli chcesz wymusić SSL i HTTPS na twoim obszarze administracyjnym WordPress lub stronach logowania, musisz skonfigurować SSL w pliku wp-config.php.

Dodaj następujący kod nad linią „To wszystko, przestań edytować!” w twoim pliku wp-config.php:

define('FORCE_SSL_ADMIN', true);

Ta linia pozwala WordPressowi wymusić SSL / HTTP w obszarze administracyjnym WordPress. Działa również w sieciach witryn WordPress.

Gdy to zrobisz, twoja witryna internetowa jest w pełni skonfigurowana do korzystania z SSL / HTTPS, ale nadal będziesz napotykać błędy mieszanej treści.

Błędy te są powodowane przez źródła (obrazki, skrypty lub arkusze stylów), które nadal są wczytywane przy użyciu niezabezpieczonego protokołu HTTP w adresach URL. W takim przypadku na pasku adresu twojej witryny internetowej nie będzie widoczna ikonka zabezpieczenia w postaci kłódki.

Not secure

Wiele nowoczesnych przeglądarek automatycznie blokuje niebezpieczne skrypty i zasoby.

Możesz zobaczyć ikonkę kłódki, ale z powiadomieniem o tym w pasku adresu twojej przeglądarki.

Insecure content blocked

Za pomocą narzędzia Inspect można sprawdzić, które treści są serwowane za pośrednictwem niezabezpieczonego protokołu.

Błąd mieszanej treści zostanie wyświetlony jako ostrzeżenie w konsoli ze szczegółowymi informacjami dla każdego elementu mieszanej treści.

Mixed content errors displayed in browser console

Zauważysz, że większość adresów URL to obrazki, ramki iframe i galerie obrazów, podczas gdy niektóre to skrypty i arkusze stylów wczytywane przez twoje wtyczki i motywy WordPress.

Poprawka mieszanych treści w bazie danych WordPressa

Większość nieprawidłowych adresów URL to obrazki, pliki, osadzanie i inne dane przechowywane w twojej bazie danych WordPress. Poprawmy je w pierwszej kolejności.

Musisz znaleźć wszystkie wzmianki o adresie URL twojej starej witryny w bazie danych, które zaczynają się od http i zastąpić je nowym adresem URL witryny, który zaczyna się od https.

Możesz to łatwo zrobić, instalując i włączając wtyczkę Search & Replace Everything. Aby uzyskać więcej informacji, zapoznaj się z naszym przewodnikiem krok po kroku, jak zainstalować wtyczkę WordPress.

Po włączaniu należy przejść na stronę Narzędzia ” WP Wyszukaj i zamień. W polu „Szukaj” należy dodać adres URL Twojej witryny internetowej z http. Następnie w polu „Zamień” dodaj adres URL Twojej witryny internetowej z https.

Add URLs into the search and replace fields

Poniżej zobaczysz wszystkie twoje tabele bazy danych WordPress. Musisz wybrać je wszystkie, aby przeprowadzić dokładną kontrolę.

Select all tables in Search & Replace Everything

Następnie kliknij przycisk „Podgląd wyszukiwania i zamiany”, aby zobaczyć wszystkie zmiany wprowadzone przez wtyczkę. Na koniec kliknij przycisk „Zamień wszystko”.

Click the Replace All button

Wtyczka przeszuka teraz twoją bazę danych WordPress pod kątem adresów URL zaczynających się od http i zastąpi je bezpiecznymi adresami URL https. Może to chwilę potrwać, w zależności od rozmiaru twojej bazy danych WordPress.

Poprawka błędów mieszanych treści w motywie WordPress

Innym częstym winowajcą powodującym błędy mieszania treści jest twój motyw WordPress. Każdy przyzwoity motyw WordPress zgodny ze standardami kodowania WordPress nie spowoduje tego problemu.

Po pierwsze, będziesz musiał użyć narzędzia Inspect twojej przeglądarki, aby znaleźć zasoby i miejsce, z którego są wczytywane.

Using inspect tool to find mixed content error

Następnie musisz znaleźć je w twoim motywie WordPress i zastąpić je https. Będzie to trochę trudne dla większości początkujących, ponieważ nie będziesz w stanie zobaczyć, które pliki motywu zawierają te adresy URL.

Poprawka błędów mieszanych treści spowodowanych przez wtyczki

Niektóre zasoby o mieszanej treści będą wczytywane przez wtyczki WordPress. Każda wtyczka WordPress zgodna ze standardami kodowania WordPress nie spowoduje błędów mieszanej treści.

Nie zalecamy edytowania plików wtyczek WordPress. Zamiast tego należy skontaktować się z autorem wtyczki i poinformować go o tym. Jeśli nie odpowiedzą lub nie będą w stanie tego poprawić, powinieneś znaleźć odpowiednią alternatywę.

Uwaga: Jeśli z jakiegoś powodu nadal napotykasz błąd mieszanej treści, zalecamy tymczasowe korzystanie z wtyczki Really Simple SSL, aby nie wpływać na użytkowników, podczas gdy poprawisz problem na witrynie przejściowej lub zatrudnisz programistę.

Prześlij swoją witrynę HTTPS do Google Search Console

Wyszukiwarki takie jak Google uważają https i http za dwie różne witryny internetowe. Aby uniknąć problemów z SEO, musisz poinformować Google, że Twoja witryna internetowa została przeniesiona.

Aby to zrobić, wystarczy przejść do twojego konta Google Search Console i kliknąć przycisk „Dodaj właściwość”.

Add property

Spowoduje to wyświetlenie wyskakującego okienka, w którym należy utworzyć nowy adres https twojej witryny internetowej.

Istnieją dwie metody weryfikacji witryny: nazwa domeny lub prefiks adresu URL. Zalecamy metodę prefiksu adresu URL, ponieważ jest ona bardziej elastyczna.

Add website URL in Google Search Console

Następnie Google poprosi Cię o zweryfikowanie własności Twojej witryny internetowej.

Można to zrobić na kilka sposobów. Wybierz dowolną metodę, a otrzymasz instrukcje dotyczące weryfikacji twojej witryny. Zalecamy skorzystanie z metody tagów HTML.

HTML tag method to verify your site

Zobaczysz teraz fragment kodu HTML, który musisz dodać do sekcji head twojej witryny internetowej WordPress.

Dodawanie kodu weryfikacyjnego Search Console za pomocą All in One SEO

Najpierw zainstaluj i włącz wtyczkę All in One SEO for WordPress. Aby uzyskać więcej informacji, zapoznaj się z naszym poradnikiem na temat instalacji wtyczki WordPress.

Uwaga: Istnieje również darmowa wersja All in One SEO, którą można wypróbować.

Po włączaniu przejdź do strony All in One SEO ” Ustawienia ogólne i kliknij Google Search Console.

Add Google Search Console verification code in All in One SEO

Poniżej należy dodać kod weryfikacyjny skopiowany wcześniej z witryny internetowej Google Search Console.

Nie zapomnij kliknąć przycisku „Zapisz zmiany”, aby zapisać twoje ustawienia.

Następnie przełącz się z powrotem na kartę Google Search Console i kliknij przycisk „Weryfikuj”.

Verify ownership

Gdy twoja witryna zostanie zweryfikowana, Google wyświetli tutaj raporty Search Console.

Musisz również upewnić się, że zarówno wersja https, jak i http są dodane do twojej Search Console.

Informuje to Google, że chcesz, aby wersja https Twojej witryny internetowej była traktowana jako wersja podstawowa. W połączeniu z przekierowaniami 301, które skonfigurowałeś wcześniej, Google przeniesie twoje rankingi wyszukiwania do wersji https witryny internetowej i najprawdopodobniej zauważysz poprawę w rankingach wyszukiwania.

Mamy nadzieję, że ten artykuł pomógł Ci dodać HTTPS i SSL w WordPress. Możesz również zapoznać się z naszym przewodnikiem po zabezpieczeniach WordPress z instrukcjami krok po kroku, aby Twoja witryna WordPress była bezpieczna lub z naszymi eksperckimi wyborami najlepszych rozwiązań analitycznych dla WordPress.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

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

406 komentarzyZostaw 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. ammar says

    Hi, if i’m using the 1st method, do I need to follow the Submit my HTTPS Site to Google Search Console step also after that?

    TQ

  3. Swen says

    I installed the Really Simple SSL plugin, which states that you should manually replace every http:// in all .css and .js files to //. That doesn’t sound really simple to me. As a beginner I set up a simple website with a couple of pictures. Is it common that http:// statements are in these files?

    • WPBeginner Support says

      Normally those links are not common so it shouldn’t be something to worry about.

      Administrator

  4. Lucas says

    Hi,
    When adding the code to .htaccess, i get a „too many redirects” error. I tryed adding to the existing code above, below, and also erasing the existing code and using only the new. All three option get too many redirects.

    Is there something I should change there? Thanks in advance for your help!

  5. Sotir Sotirov says

    I’ve tried using the plugin but when I do the website becomes not accessible. I’ve tried the manual approach but once I’ve changed the addresses in WP settings the site becomes not accessible again.

    • WPBeginner Support says

      You would want to reach out to your hosting provider to ensure that your SSL certificate is connected to your domain correctly and they should be able to help :)

      Administrator

  6. Mike Ashworth says

    I am about to make the change to SSL and will be following the guidance in te article, initially using the really simple ssl plugin. Before i begin i have a quick question.

    If I use the really simple ssl plugin, which takes care of everything, i can leave the general settings in wordpress for wordpress address and site address as http rather than change to https as the plugin will be taking care of it?

      • Mike Ashworth says

        Thanks for confirming. I have one other rquestion.

        having just activated lets encrypt ssl on siteground for a website, i am asked wther i want to switch the following on or leave it off.

        HTTPS Enforce – Forces your site to work entirely over an encrypted HTTPS connection. The redirect is performed on server level and works for any website.

        Do i leave this off as the really simple ssl plugin will take care of this as well?

        • WPBeginner Support says

          Yes, you can leave that off, you would only want to use that should there be any issues with the plugin or Google finding http links

        • Mike Ashworth says

          Thanks for your advice. WP Beginner is such an awesome website. Keep up the great work!

  7. stephan says

    I want to thank you a lot. I have been looking for the errors over 12hours and get it done with better replace plugins. Thanks a lot dear.

  8. Peter Wilson says

    Can someone tell me, do I replace the contents on my.htaccess. file with the suggested code or do I place it and the beginning/end of the eisting entry.

      • Peter Wilson says

        Thanks for the quick reply. So, would that be after the existing and before the # END WordPress, or does it go after the .

        • WPBeginner Support says

          That should not matter, it may be a good idea to do it after should you need to remove the code in the future :)

    • WPBeginner Support says

      For Google Analytics you should be able to update to https under your property settings

      Administrator

  9. Arif Ahmed says

    When I enable „WordPress 301 redirection to SSL” option from „Really Simple SSL Plugin” it works fine, but it removes query parameters. For example, when I get users from Adwords campaign it strips off gclid parameters.

    Please guide

    • WPBeginner Support says

      You would want to reach out to Really Simple SSL’s support to see if there is an option for query strings.

      Administrator

  10. Oswald Porter says

    Thanks for your helpful article.
    The manual SSL/HTTPS set up seems be be working for the main site.
    However the mixed content error (images) still appears after using the Better Search Replace plug-in.
    At Media Library, images appear with 'https’, but not at the site’s each post
    Indeed, at all posts, when I right-click on the post image > 'Copy image address’, it shows:
    http://
    Ideas? Thanks in advance.

  11. Kathy says

    Hi,

    I used this tutorial on many sites and it works like a charm. Thanks for that.

    Do you know if I can also use it to update my multisite(s). Or are additional steps needed?

    • WPBeginner Support says

      Depending on how your multisite is set up there are normally more steps involved. If you reach out to your hosting provider they can normally help

      Administrator

  12. Oz says

    Fantastic and straightforward!

    What steps do we need to take to make sure our social share count (e.g., Facebook, Twitter) are still available?

    • WPBeginner Support says

      You could try 301 redirecting the http articles to https but unless I hear otherwise, social media sites see the two as different links so you are likely going to lose your shares unless they have added a method to update your share counts.

      Administrator

    • WPBeginner Support says

      There are multiple possible reasons for a change in traffic so it is hard to say if that is the only reason or if there were other reasons for a drop in traffic.

      Administrator

  13. Shawn says

    Thank you for such a great piece of content.
    It seems like using the Really Simple SSL plugin is way easier than changing codes and scripts on my own.

    My question – what if the plugin did not get updated in the future? Is this going to cause a problem for our urls?

    And, after installing the SSL from my web host, all I need to do is to activate Really Simple SSL plugin and everything will be redirected to https?

    Shawn

    • WPBeginner Support says

      It would depend on what changes in WordPress’ core code and how long it has not been updated for the possible issues. The plugin should automatically update your content that it is able to use HTTPS without you needing to modify anything on your end if you wanted.

      Administrator

  14. Nathaniel says

    Just wanted to say thank you. I was not looking forward to doing this, but you’re guide made it easy and quick. Thanks!!!

  15. Sheri Ellis says

    I made the mistake of following your manual instructions before our SSL cert had been installed. All I did was edit the general settings for the URL to https. And now the site is hosed. I’ve been editing every PHP file to include:
    define( 'WP_HOME’, 'http://mysite.com’ );
    define( 'WP_SITEURL’, 'http://mysite.com’ );

    and it’s being ignored. So now my site is hosed. FYI I’m using WordPress 5.1.1 which appears to have significant changes. Help!

  16. John J Cooke says

    This made making the switch a snap. I was sitting on the ssl cert with no sure way how to convert. Really appreciate the easy instructions.

  17. Mandee says

    Oh my goodness, THANK YOU! I’ve reached out to my hosting company, as well as a developer. They both made it seem like an impossible task to do on my own. Just took care of this is literally 30 seconds because of you. I can’t thank you enough! I wish I would have found this article sooner—would have saved me a lot of headache!!

  18. Jerry says

    Hi,

    I tried twice your step guide end everything worked great. Now that i have SSL i am trying to migrate but there is a problem on the final step, so it cannot be finalized. Is it a problem i had Lets Encrypt on old server and now that the new one has another, to have caused a problem. Would you recommend remove SSL on old hosting and after that using dublicator to start the articles process?

    • WPBeginner Support says

      Who has your SSL should not be a factor for it not working, you could try to see if that works but it is normally due to another cause.

      Administrator

  19. BILAL ALI AHMAD says

    Hi,

    I applied all steps and https version is working fine on my website but the non-https version is still accessible when I type http: mysite.com

    how to resolve this issue?
    Also when I click on my google search link for my website user also lands on non-https version and after that if I access the website again it comes with https
    please tell me how to resolve this issue?

    • WPBeginner Support says

      If you already submitted your site to Google’s Search console then Google may have cached the http version in their search. For the http version being available, you may want to ensure the redirects were all saved.

      Administrator

  20. Clement says

    This was surprisingly simple that’s why I rely on you guys, had actually thought it would be horrible.

  21. Marc-Lyon says

    Thanks for the great tutorial. Only issue I’m stuck with is that URLs with www appended give an error message in browser:

    „This site can’t provide a secure connection uses an unsupported protocol.
    ERR_SSL_VERSION_OR_CIPHER_MISMATCH
    Unsupported protocol
    The client and server don’t support a common SSL protocol version or cipher suite.”

    I’ve checked and both non-www and www versions have valid SSL certificates. Any idea why the www version is not working?

    • WPBeginner Support says

      Start by reaching out to your hosting provider to ensure they don’t have a setting on their end for the www specific version of your site.

      Administrator

      • Marc-Lyon says

        Managed to sort it out. Cloudflare was causing the issue.
        Solution: disable and re-enable Universal SSL under Crypto settings.

        • WPBeginner Support says

          Glad you were able to find the cause and thanks for sharing the solution should anyone else run into the issue :)

  22. illy says

    All my images were inserted with http protocol. I used Better Search Replace to fix this and it worked like a charm!

    thank you

  23. Didier says

    I have a problem with the redirect from http to https.

    Using the above mentioned code in the .htaccess file,

    my index page http:// example.com redirects to httpS:// example.com

    BUT

    A subpage http:// example.com/sublink does NOT redirect to https:// example.com/sublink

    Does anybody know how to solve this?

    Thank you!

    • WPBeginner Support says

      You may want to reach out to your hosting provider to ensure they are not overriding any redirects on your site or if they see the code was copied incorrectly.

      Administrator

  24. Jason says

    Yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeees! The first WP edit that has ever worked first time for me! I’m taking the rest of day off to celebrate.

    :-)

  25. Rafaqat Ali says

    Hi thanks for the article, I have shifted my site to ssl by using the article elaborated above.
    Let me clear a few things:
    1- I have added a new property in Google search console with https:// should I delete the http:// property or remain the both.
    2- How long it will take to show google search data in the search console report.
    3- Should I make a 301 redirect to https:// version.
    4- How to get all my backlinks to https:// version.
    ( i have submitted the XML sitemap and robots..txt file also with new property)
    Thanks for your time

    • WPBeginner Support says

      Hey Rafaqat,

      If you have set up 301 redirect to your HTTPS urls, then you can leave them both. They would start appearing in search very soon, however of your redirects are properly setup you wont see any difference in your traffic or search rankings.

      Administrator

  26. Eva says

    Hi and thank you for the detailed tutorial
    I have activated the ssl protocol on a new wordpress installation and after the activation the site’s started opening with https and green padlock ( all pages, with and without www search and if searching http version) even the admin area as far as the theme and editor , however the wordpress and site URL fields in the settings General page still need to be changed to https as they appear as http and any new publication (so as the ones alredy been there) has http link and when editong page appearancefrom main menu it shows exclamation mark oven the secure connection padlock
    In that case do I need to go thru all process or after updating the general settings page to https it will be ok ?
    It’s my first time doing that and I prefer ( if have to) to do it manually by the 2 method as it very well explained
    Thanks

  27. Bernard Brillo says

    I’ve tried following the manual tutorial but I end up seeing a blank white page on my homepage and all of my other page are now inaccessible. My website is hosted in Amazon and I’m also using W3 total cache.

    Do I need to do something else to make this work?

    Any suggestions will be much appreciated.

    • Donatas Vaiciulis says

      On my website was W3 total cache, when I disabled it worked everything fine. I think after htaccess edit needed to reinstall plugin and do w3 settings again. Not tried yet, soon will try.

  28. Karo Itoje says

    Hello,

    As usual thanks for the detailed tutorial. I decided to do the manual option (option 2) because it seemed simple enough to follow through. However when I pasted the second code for nginx servers into configuration file (wp-config.php) I got a syntax error. So I had to remove the code. But I will still like to follow through with that option so if you can please maybe take a look at that code again and correct it then I’ll really appreciate it.

    Also just to get this clearly, it is either:

    „set up WordPress redirects from HTTP to HTTPS by adding the following code to your .htaccess file.”

    OR THIS

    „If you are on nginx servers (most users are not), then you would need to add the following code to redirect from HTTP to HTTPS in your configuration file:”

    Not both right?

  29. Rohan Kothari says

    Hi,

    I am planning to start an e-commerce store. Do I need to purchase a wildcard SSL certificate and a dedicated IP to enable payments on my website or will the free SSL certificate bundled with web hosting plans be adequate?

  30. Oliver says

    Hi Guys,

    1st off a great and helpful article, thanks. I have changed my site from http to https and it took a lot less time than I expected, using the Better Search and Replace manual method. But now I can’t seem to change the address of the http version in the Google Search Console. It has both of the sites there but won’t allow me to swap. Is this necessary to do? It seems as if the redirects are working. Should I get the https site indexed as much as possible or will google do that with the http redirects anyway?

    • WPBeginner Support says

      Hi Oliver,

      If you have both sites in the search console and a redirect in place, then Google will automatically detect the transition and will start showing reports for your HTTPS site.

      Administrator

  31. Victor Fernando says

    I used the first method, although I have experience in programming, I don’t have it in wordpress and I don’t dare to get my hands on the code even though it’s not that complicated.
    the first method worked i.e. installing the free plugin version.
    Thanks for the tip

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ę.