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

WordPressをHTTPからHTTPSに正しく移行する方法(初心者ガイド)

WordPressをHTTPからHTTPSに移行し、サイトにSSL証明書をインストールしようとお考えですか?

Googleが2018年7月に、ChromeブラウザーがSSLのないサイトはすべて安全でないとマークすると発表したため、このトピックについて多くのリクエストをいただいています。

この投稿では、SSL証明書を追加してWordPressをHTTPからHTTPSに適切に移行する方法を紹介します。

Moving WordPress from HTTP to HTTPS / SSL

SSLやHTTPSが何なのかわからなくても心配しないでください。それもこれから説明します。

HTTPSとは何か?

HTTPSまたはSecure HTTPは、ユーザーのブラウザーとサーバー間の接続を保護する暗号化方式です。これにより、ハッカーによる接続の盗聴が難しくなります。

私たちは毎日、購入やログイン中など、さまざまなサイトで個人情報を共有しています。

データ転送を保護するためには、安全な接続を作成する必要がある。

そこで登場するのがSSLとHTTPSだ。

各サイトには、識別のために固有のSSL証明書が発行されます。もしサーバーがHTTPSのふりをしていて、その証明書が一致しない場合、ほとんどの最新のブラウザーはユーザーにそのサイトへの接続を警告します。

Connection not private error in Google Chrome

さて、なぜWordPressサイトをHTTPからHTTPSに移行する必要があるのか、特に支払いを収集しないシンプルなブログや中小企業のサイトであれば、不思議に思うことだろう。

なぜHTTPSとSSLが必要なのか?

2018年、Googleはサイト所有者にHTTPからHTTPSへの切り替えを促すことで、ウェブセキュリティ全体を向上させる計画を発表した。この計画の一環として、同社の人気ウェブブラウザChromeは、SSL証明書のないサイトはすべて “Not Secure “とマークすることになった。

Connection not secure

Googleはまた、SSLを導入したサイトはSEO上もメリットがあり、安全でないサイトよりも検索順位が上がると述べている。それ以来、多くのサイトがHTTPからHTTPSに切り替えた。

この発表の後、GoogleはChromeで「安全ではありません」という警告の展開を開始した。例えば、誰かがシークレット・ウィンドウを使ってHTTPサイトにアクセスすると、「安全ではありません」と表示される。通常モードでHTTPサイトにアクセスし、お問い合わせフォームやその他のフォームに入力しようとすると、そのサイトは安全でないと表示されます。

読者やカスタマイザーがこの告知を目にすると、あなたのビジネスに悪い印象を与えてしまう。

このため、すべてのサイトはHTTPからHTTPSに移行し、SSLをすぐにインストールする必要がある。

eコマースサイトでオンライン決済を利用する場合は、言うまでもなくSSLが必要です。

Stripe、PayPal Pro、Authorize.netなど、ほとんどの決済会社は、支払いを受け付ける前にセキュアな接続を必須としています。

WPBeginner、OptinMonsterWPFormsMonsterInsightsなどのサイトではSSLを使用しています。

WordPressサイトでHTTPS/SSLを使用するための必須条件

WordPressでSSLを使用するための必須条件はそれほど高くありません。必要なのはSSL証明書を購入することだけで、すでに無料で持っているかもしれません。

最高のWordPressホスティングサービス会社は、すべてのユーザーに無料のSSL証明書を提供しています:

詳しくは、WordPressサイトの無料SSL証明書の取得方法をご覧ください。

ホスティングサービス会社が無料のSSL証明書を提供していない場合は、SSL証明書を購入する必要があります。

Domain.comを利用することをお勧めします。Domain.comは、通常のSSL証明書とワイルドカードSSL証明書の両方で最高のSSL契約を提供しているからです。

同社からSSL証明書を購入することで、サイト用のTrustLogoサイトシールも取得でき、各SSL証明書には最低10,000ドルのセキュリティ保証が付いてくる。価格は年間33ドルからで、SSL証明書は自動的に更新される。

SSL証明書を購入したら、ホスティングサービスにインストールを依頼する必要があります。

SSLとHTTPSを使用するWordPressの設定

ドメイン名のSSL証明書を有効化した後、WordPressでSSLとHTTPプロトコルをサイトで使用するように設定する必要があります。

そのための2つの方法を紹介するので、自分のニーズに合った方を選んでほしい。

動画チュートリアル

Subscribe to WPBeginner

文章での説明がお好きな方は、このまま読み進めてください。

方法1:プラグインを使ってWordPressにSSL/HTTPSを設定する

この方法は簡単で、初心者にお勧めだ。

まず、Really Simple SSLプラグインをインストールして有効化する必要があります。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化したら、設定 ” SSLページにアクセスする必要があります。プラグインは自動的にSSL証明書を検出し、HTTPSを使用するようにWordPressサイトを設定します。

SSL enabled on a WordPress website

プラグインは、コンテンツが混在している場合のエラーも含め、すべてを処理します。プラグインが裏で行っていることは以下の通りです:

  • SSL証明書の確認
  • WordPressのURLでhttpsを使用するように設定する
  • HTTPからHTTPSへのリダイレクト設定
  • コンテンツに含まれるURLのうち、まだ安全でないHTTPソースから読み込まれているものを探し、修正を試みる。

注:このプラグインは、出力バッファリング技術を使用して、混合コンテンツのエラーを修正しようとします。ページが読み込まれる際にサイトのコンテンツを置き換えるため、パフォーマンスに悪影響を及ぼす可能性があります。この影響は最初のページ読み込み時にのみ見られ、キャッシュプラグインを使用している場合は最小限にとどまるはずです。

プラグインにはSSLを維持したままプラグインを安全に無効化できると書かれていますが、100%真実ではありません。プラグインを無効化するとミックスコンテンツエラーが復活するので、プラグインはすべて有効化したままにしておく必要があります。詳しくはReally Simple SSLレビューをご覧ください。

方法2:WordPressでSSL/HTTPSを手動で設定する

この方法では、手動でトラブルシューティングを行い、WordPressファイルを編集する必要があります。しかし、これは恒久的でよりパフォーマンスに最適化されたソリューションであり、私たちはWPBeginnerでこれを使用しています。

この方法が難しいと感じる場合は、WordPress開発者を雇うか、最初の方法を代わりに使うことができる。

この方法の一環として、WordPressテーマとコードファイルを編集する必要があるかもしれません。この作業を行ったことがない場合は、WordPressでコード・スニペットをコピー&ペーストする方法をご覧ください。

まず、設定 ” 一般ページにアクセスする必要があります。ここから、httpをhttpsに置き換えてWordPressとサイトのURLアドレス欄を更新する必要があります。

Update WordPress URLs

変更を保存」ボタンをクリックして、設定を保存することを忘れないでください。

設定が保存されるとWordPressはログアウト中となり、再ログインを求められます。

次に、.htaccessファイルに以下のコードを追加して、WordPressのHTTPからHTTPSへのリダイレクトを設定する必要がある:

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

NGINXサーバーを使用している場合は、設定ファイルにHTTPからHTTPSにリダイレクトするための以下のコードを追加する必要があります:

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

example.comをあなたのドメイン名に置き換えることをお忘れなく。

これらの手順を実行することで、WordPressがHTTPSを使用してサイト全体を読み込むため、WordPress HTTPS not workingエラーを回避できます。

WordPressの管理エリアやログインページでSSLとHTTPSを強制したい場合は、wp-config.phpファイルでSSLを設定する必要があります。

wp-config.phpファイルの“That’s all, stop editing!”行の上に以下のコードを追加します:

define('FORCE_SSL_ADMIN', true);

この行により、WordPressの管理エリアでSSL/HTTPを強制することができます。WordPressのマルチサイトネットワークでも動作します。

これを行うと、サイトはSSL / HTTPSを使用するように完全に設定されますが、コンテンツが混在したエラーが発生します。

これらのエラーは、URLのソース(画像、スクリプト、スタイルシート)がまだ安全でないHTTPプロトコルを使用して読み込まれているために発生します。この場合、サイトのアドレスバーに安全な南京錠のアイコンが表示されません。

Not secure

最近のブラウザーは、安全でないスクリプトやリソースを自動的にブロックするものが多い。

南京錠のアイコンが表示されますが、ブラウザーのアドレスバーにはその旨が表示されます。

Insecure content blocked

どのコンテンツが安全でないプロトコルで提供されているかは、Inspectツールを使って調べることができます。

混合コンテンツエラーは、各混合コンテンツ項目の詳細とともにコンソールに警告として表示されます。

Mixed content errors displayed in browser console

ほとんどのURLは画像、iframe、画像ギャラリーであり、一部はWordPressプラグインやテーマによって読み込まれたスクリプトやスタイルシートであることがわかります。

WordPressデータベースの混合コンテンツの修正

不正なURLの大半は、WordPressのデータベースに保存されている画像、ファイル、埋め込み、その他のデータです。まずはそれらを修正しましょう。

データベースから、httpで始まる古いサイトのURLをすべて探し出し、httpsで始まる新しいサイトのURLに置き換える必要があります。

Search & Replace Everythingプラグインをインストーラし、有効化することで簡単に行うことができます。詳しくは、WordPressプラグインのインストール方法のステップバイステップガイドをご覧ください。

有効化したら、Tools ” WP Search & Replaceページにアクセスしてください。検索」フィールドの下に、httpであなたのサイトのURLを追加する必要があります。その後、「置換」フィールドにhttpsのサイトURLを追加します。

Add URLs into the search and replace fields

その下に、WordPressデータベースのテーブルがすべて表示されます。徹底的なチェックを行うには、すべてを選択する必要がある。

Select all tables in Search & Replace Everything

次に、「Preview Search & Replace」ボタンをクリックして、プラグインが行うすべての変更を確認します。最後に、「すべて置換」ボタンをクリックします。

Click the Replace All button

プラグインはWordPressデータベースのhttpで始まるURLを検索し、安全なhttpsのURLに置き換えます。WordPressデータベースのサイズによっては、しばらく時間がかかる場合があります。

WordPressテーマのコンテンツが混在したエラーの修正

コンテンツが混在したエラーを引き起こすもう一つの一般的な原因は、WordPressテーマです。WordPressのコーディング標準に従ったまともなWordPressテーマであれば、この問題は発生しません。

まず、ブラウザーのインスペクトツールを使って、リソースとその読み込み元を見つける必要がある。

Using inspect tool to find mixed content error

その後、WordPressテーマでこれらのURLを見つけ、httpsに置き換える必要があります。どのテーマファイルにこれらのURLが含まれているのかを確認することができないため、ほとんどの初心者には少し難しいでしょう。

プラグインによるコンテンツ混在エラーの修正

WordPressプラグインによって読み込まれる混合コンテンツリソースがあります。WordPressのコーディング標準に従ったWordPressプラグインであれば、ミックスコンテンツエラーは発生しません。

WordPressプラグインファイルの編集はお勧めしません。代わりに、プラグイン作者に連絡して、その旨を伝えるべきです。もし作者が対応してくれなかったり、修正できなかったりした場合は、適切な代替案を探してください。

注:何らかの理由でまだコンテンツが混在したエラーが発生する場合は、ステージングサイトで問題を解決するか開発者に依頼する間、ユーザーに影響が出ないように Really Simple SSL プラグインを一時的に使用することをお勧めします。

HTTPSサイトをGoogle Search Consoleに送信する

Googleのような検索エンジンは、httpsとhttpを2つの異なるサイトとみなしています。SEO上の問題を避けるためには、Googleにサイトが移転したことを知らせる必要があります。

そのためには、Google Search Consoleのアカウントにアクセスし、「物件を追加」ボタンをクリックするだけです。

Add property

ポップアップが表示され、サイトのhttpsアドレスを追加する必要があります。

サイト認証には、ドメイン名またはURLプレフィックスの2つの方法があります。より柔軟性が高いため、URLプレフィックス方式をお勧めします。

Add website URL in Google Search Console

その後、Googleはあなたのサイトの所有権を確認するよう求めます。

それにはいくつかの方法があります。いずれかの方法を選択すると、サイトを検証するための指示が表示されます。HTMLタグを使用する方法をお勧めします。

HTML tag method to verify your site

WordPressサイトのheadセクションに追加するHTMLコードスニペットが表示されます。

All In One SEOを使ってSearch Console検証コードを追加する

まず、All In One SEO for WordPressプラグインをインストールして有効化します。詳しくは、WordPressプラグインのインストール方法のチュートリアルをご覧ください。

注: All In One SEOには無料版もあり、試すことができる。

有効化したら、All In One SEO ” 一般設定ページに移動し、Google Search Consoleをクリックします。

Add Google Search Console verification code in All in One SEO

その下に、先ほどGoogle Search Consoleのサイトからコピーした認証コードを追加する必要があります。

変更を保存」ボタンをクリックして、設定を保存することを忘れないでください。

次に、Google Search Consoleタブに戻り、「検証」ボタンをクリックします。

Verify ownership

サイトが認証されると、Googleはサーチコンソールレポートをここに表示します。

また、https版とhttp版の両方がSearch Consoleに追加されていることを確認する必要があります。

これにより、Googleはhttps版を主要なサイトとして扱ってほしいことを伝えます。先に設定した301リダイレクトと組み合わせることで、Googleは検索順位をhttpsバージョンに転送し、検索順位が向上する可能性が高くなります。

この投稿がWordPressにHTTPSとSSLを追加するのにお役に立てば幸いです。WordPressサイトを安全に保つためのステップバイステップの手順が記載された究極のWordPressセキュリティガイド、または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.

情報開示 私たちのコンテンツは読者支援型です。これは、あなたが私たちのリンクの一部をクリックした場合、私たちはコミッションを得ることができることを意味します。 WPBeginnerの資金源 をご覧ください。3$編集プロセスをご覧ください。

アバター

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.

究極のWordPressツールキット

ツールキットへの無料アクセス - すべてのプロフェッショナルが持つべきWordPress関連製品とリソースのコレクション!

Reader Interactions

406件のコメント返信を残す

  1. Syed Balkhi

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

    This article is a little bit trap for newbie because if you first change to https in your wp panel and then try to add those codelines to right files you can’t reach your webiste or wp admin panel. (443 error) I had to edit files through ftp and made myself fool at work for making such a mistake. So first you have to get the certificates and edit htaccess file etcetc and then add that S in your wp admin panel (or directly edit thorugh ftp).

    • Daryl

      Thanks for heads up ! good article

  3. Huseyn

    Hi! Thank you for this article. Very useful!

    But I was faced with one problem. After installing SSL (I use free version of Cloudflare SSL) I cannot edit any pages/posts/products. Does anybody face with such problem? And how did you solve it?

    Thanks in advance!

  4. Michael Penner

    Thank you for the excellent and easy to understand article about WordPress and SSL. I was pleasantly surprised to see it was from one of my favorite plugin authors. Cheers!

  5. Maurizio Mau

    Hi and many thanks for post,
    i have implemented SSL, run good on all bowser included mobile, load in 1.5 sec, console upgraded, analitucs upgraded, redirect done, fixed all element but ranking drop approx 20% and above…

  6. Onis Egwu

    Hello There,

    Wonderful article. The issue I have with using the .htaccess file to route through https is that whenever WordPress updates, it cleans off the edits done.

    Is there a way to avoid this?

  7. max

    hi there,
    i saw your post and is interesting..but i can’t understand one thing… I read you article and i made all about it … in admin area is ok all is https..

    but the front end no .. i mean when i see the site with chrome the padlock appear and then disappear ???!??!?!

    any ideas?

    • Hardy

      I am having the same issue. :/

  8. Swapan Kumar Manna

    Hello,

    I’ve purchased an SSL certificate form Godaddy and it is approved and downloaded the .crt file. I’m bit confused what are the next steps to install the file in the server and how to redirect all the URLs in the existing WordPress site. Can anyone give me the detailed guide step by step.

    Also requesting WPBeginer to write an article on this topic “How to install SSL certificate in Godaddy.

    Thanks.

    • Cathy Larkin

      did you fix your issue? I am getting ready to do this. I thought GD did it for you?

  9. Rohit

    Hi, as you said I went to my wordpress blog settings page and changed my domain url to https from http and clicked save however Now I am not able to login to my wordpress dashboard and getting 404 error.

    How can I solve this please becuase I cannot even login to my wordpress dashboard to change it back to http again

  10. Abhay

    Hello sir, I want to know why you are not using https on wpbeginner?

    • WPBeginner Support

      Hi Abhay,

      We don’t use HTTPS because we don’t collect any secure data. We do plan to change as our needs will change in the near future.

      管理者

  11. Pat B

    Fantastically clear and helpful instructions. Many thanks!

  12. Brody James

    Hi,

    This worked great after following your steps. However, I notice that a few pages i.e. contact page does not display the green SSL lock but still displays https://

    How do I fix this?

    Thanks
    BJ

  13. Vaggelis

    That really rocked!!! Thank you so much. The https rocks :-) :-) :-)

  14. Esther

    Thanks so much for this.

  15. Amin

    all SSL redirections have problems with cookies didn’t found a solution from a year now. can someone help ? plz ? there is a big problem on auth cookies .. and got redirect to reauth=1
    there is no synch of cookies between front and backend , and authors get disconnected when they upload files .. I think it’s related to root/wp-load.php and /wp-admin/async-apload.php

  16. Amritosh Pandey

    Please try this –

    # BEGIN WordPress

    RewriteEngine On
    RewriteCond %{SERVER_PORT} !^443$
    RewriteRule (.*) https://{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    • Joe

      This Worked for me in my .htaccess file, all I needed to do was to change the port to “80”

      The htaccess snippet in the post just refused to work.
      thanks for this.

  17. Amy

    Hi, just wanted to let you know I added Let’s Encrypt to my site and changed it in my WordPress dashboard it automagically updated the LOGIN page. I didn’t need to add the code to the wpconfig.php file.

    I wonder if this is a new addition to WordPress?

  18. Meenakshi

    Hi,
    I recently moved my WP site from WP’s free hosting to another hosting site, the issue I’m facing is with SSL. Any help from here is appreciated?

    • Daniel

      What issues are you having?

  19. sujith

    Hi , after converting to https i am getting error like

    “You do not have sufficient permissions to access this page” in wp-admin

    Not able to access wp-admin.

    When i revert the changes its working fine.

    Can anybody please help

  20. Bruce

    My website is redirecting under
    https to a different website and I cannot find where the redirect is.

    Any ideas as to where to look would be appreciated.

    I have tested the plugins by disabling them.
    I have tested the themes by changing themes.
    I have looked at the htaccess.

    All works well except under https where it redirects to one of my other sites.

    Any help appreciated.

  21. Rrich

    Hi,

    I changed the wordpress and site address at the General settings tab at wordpress from http to https. And I can’t access my site again.

    I now get your site is insecure when Ii type in he url.

    I can’t even access the admin.

    Please help

    • Karl D.

      Don’t know if you got this fixed, but you can go into mysql (phpMyAdmin) and look for the table wp-options. There you will find a table entry titled “siteurl” and one titled “home” you can remove the s from https in the url there and your site will come back. I would make sure that you have the .htaccess and wp-config edited like stated in this article first and upload them to your site first and check if things work from there. If not, reset the .htaccess and wp-config file and edit the mysql like stated above and your site will come back when accessed without the https.

      Good luck!

      Best,
      Karl D.

      • Kalle

        Thanks Karl ! This worked ! I just edited the files in (phpMyAdmin) !
        So if you mess with http / https settings with your wP try this !

        I tried to edit my .httaccess file for 2-3 hours….. :-o

  22. Moty

    After activation and change force admin ti https can’t login- Page Not found 401
    can you please let me know how can I revert the changes?
    thanks

    • Moty

      I have erased the plugin via file manager,
      Now can login to my wp admin but still can’t get into the plugins panel VIA Wp ,
      it is asking for an https address
      Please help
      Thanks

  23. Naeem Hussain

    Dear Sir WPbeginner,

    I installed SSL + dedicated IP Certificate to my Wp Website name computerpakistan.com. Now its everything working fine, But problem with my website page speed.

    Before SSL Speed
    1.8 seconds
    After SSL Installation site page Speed
    4.3 Secondes by gtmatrix report

  24. Ritesh

    I am not able to access the admin area after I uploaded define(‘FORCE_SSL_ADMIN’, true); to wp-config.php. My site was already using wordpress https plugin with force ssl administration checked in. I removed that plugin using ftp but I am still not able to login. It says incorrect username or password. However neither the password nor the username has been changed. I think this was the problem after I tried adding define(‘FORCE_SSL_ADMIN’, true); to wp-config.php. I can see the login page on https version of the site but not able to login. Please guide further.

    • Ritesh

      Its absolutely blank page and nothing else.

      • The Platypus

        I’m hopeful you ran a back up before doing any changes to your site.. in either case revert back your site to an earlier state via your database, and whatever back up of your config.php file you have.

    • Florin

      I’m having the same problem. I checked everything but I still cannot login in my admin area.

      • Stephen

        I had a similar problem after enabling FORCE_SSL_ADMIN in wp-config.php.

        The login page etc. was coming up ok over HTTPS but it wouldn’t let me login successfully.

        In this case, it was a plugin interfering – “Chap Secure Password Login”. After deactivating it, logins worked ok (and in fact, it’s not needed when WordPress is configured to force SSL on the admin page).

        So I would suggest checking any login related plugins and try deactivating them.

        Another issue is if you are using something like HAProxy in front of your webserver for load balancing, and get something like a “too many redirects” error message after trying to move WordPress to HTTPS.

        In this case, you most likely need to modify wp-config.php to tell WordPress that the connection is actually HTTPS, otherwise it will keep trying to redirect even when the client connection is over HTTPS. There are some details here,

  25. Monu

    Hello sir I am using wordpress with https and www ……………….. in my site everthing is okay url of posts and pages are also use https but in google search results not show https in my website address only show http://www.example.com/post...

    • WPBeginner Support

      You will need to inform Google about change of address from Google Webmaster Tools.

      管理者

  26. Raivat

    Hi, I followed your tutorial. Thanks, Everything works! But I am getting an error when I load the home page saying “Your connection to this site is private, but someone on the network might be able to change the look of the page”. I checked it out and it seems there is a problem in one of my font resources which uses Google Fonts with http instead https, can you show me how can I fix this?

    Thanks :)

    • Sebastian

      Try removing the “http://” from the Google Font call. So it’s not being forced across HTTPS. The reference call to the Google Font link should start with the “www.” instead of “http://”

  27. Naval Gupta

    Should we use 301 redirect to redirect all http pages to https pages?

  28. Mark Cohen

    Everything working fine, except that when on Dashboard > Home I get exclamation mark across padlock in URL bar. Anyone know what content is being served insecurely on this page?

  29. Joel

    I made the changes in the site before I set up the certificate and now can not access the back end of my site.

  30. David gillies

    Hi followed your example and now cant access the website at all
    if I try

    all I get is jumbled page with no styling

  31. Adrienne

    I need to do this soon for my nonprofit site, and I’m scared! :-) Paying for this is going to be extra too, but I have to do it!. Thanks for this info….

  32. Lourdes

    So this comes up when I google my Blog Page. Using Bluehost/wordpress – DOES THIS MEAN O need to fix the SSL Cert issue aka buy from bluehost? Thank you!!!!

    [We didn’t find any SSL certificate present on the website which is bad for users privacy. The site has a title but meta description is absent, it will be better for SEO if both are present. Homepage is in English.]

  33. Maxim

    Thanks for this post! Helped a lot!

  34. Penny

    What if you have Mixed Content going on and were asked to fix that before you proceed with installing SSL?

    My Firewall, Sucuri said that I need to fix the mixed content before they can install the SSL. Now I’m stuck and do not know how to proceed. I’m nervous with installing plugins. They recommended really-simple-ssl plugin. Have you had any experience with this? I try to limit the using plugins…

  35. Jarred

    We installed the plugin WordPress HTTPS (SSL). We chose to only use SSL on specific pages option and everything is working great. However we have two important questions that came about after reading the GOOGLE article about migrating to https. Not sure if I can share link on here, so this is the title “Secure your site with HTTPS” on support google.
    Questions.
    1. Does the plugin WordPress HTTPS (SSL) automatically create 301 redirects to help search engines know we moved to https on those specific pages?
    2. If the plugin does not create the 301 redirects, do WE need to go ahead and create the 301 redirects manually for those specific pages that we added SSL on? Thank you in advance

    • WPBeginner Support

      See if the plugin is redirecting by checking it with an online redirect checker tool. If it isn’t, then you can setup your own redirects.

      管理者

      • Jarred

        I followed your advice and found a redirect tool. We used it and realized that the WordPress HTTPS (SSL) plugin DID in Fact create 301 redirects automatically. Great review and tutorial on this blog post and everything is working great. Thanks

  36. adam vikar

    For a multisite setup, is there a code we can use to force SSL on the main site and NOT a specific subdomain?

  37. Michelle

    I put the wrong info in the SSL host box and now I get a 404 error. I cannot get back to any of my pages to disable the plugin or to change the info in the SSL host box. Please advise….

    • Easiest solution - delete the plug-in

      The easiest solution is to delete the plug-in.

      Access the files on your server (If you are using cPanel, you can use ‘File Manager’
      Browse to where the plug-ins are kept
      /wp-content/plugins

      Find the plug-in and delete it.

    • Hiep Pro

      You can use ftp client to delete plugin folder on web dir.

  38. Jithin Johny George

    Hi,

    Awesome step-by-step guide.

    But the plugin you have mentioned,WordPress HTTPS (SSL) has not updated in years.

    Is there any alternative for the plugin ?

    Thank You

    • Penny

      I was advised by my firewall company to use Really Simple SSL. I haven’t tried it yet but they highly recommend it.

  39. Kris Gabriel

    Fantastic guide, simple and usefull.
    The only thing to worry about is that the redirects causes the page to slow a bit down.

    Is implementing the code listed above into the .access file the first choice or is it better with just a plugin?

    I´ve chosen both options, that means both a wordpress https plugin AND .access code.
    Would you say that is benicial or not?

    Kind regards
    Kris

  40. Mursaleen Kamal

    Assalam Alaikum Sir: We Have Been Successfully Implement this Guide on Our Website But We Still Facing Redirect issue,

    Our Website Is Accessing from Both URL

    http and https

    and How to Resolve Mix Content Issue?

  41. Ahmed Muhi

    Thank you so much it worked.

  42. Ali

    Hello,
    Thank you for your guide. I add this code in my htaccess file
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80
    RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]

    but now it do not do 301 redirect it is doing 302 redirect.
    Please tell me is it ok to do 302 redirect or not.

    Regards

    • WPBeginner Support

      A 301 redirect means that the page has permanently moved to a new location. A 302 redirect means that the move is only temporary. Search engines need to figure out whether to keep the old page, or replace it with the one found at the new location.

      管理者

  43. Ana

    Thanks for the article, but I should definitely have read it before adding the SSL and https to WP. Total newbie but somehow managing a wordpress site..

    Changed WP site address on the settings page from http to https after an update recommendation on my admin panel. But now I can’t access the website or admin page! All I get is a blank page with the message ERR_TIMED_OUT and site can’t be reached.

    I realised I hadn’t activated the free SSL certificate that comes with our web hoster. Now I have done that and I’ve tried adding a WP SSL redirect (http to https) code to the .htaccess file as well. And tried adding define force_SSL_admin to wp-config.php, but nothing has changed and I don’t know how to undo or fix the issue. Any suggestions or experience in this issue would be very helpful!

  44. mirko

    sorry, but…I did not understand the part of .htaccess files … Must I add code to my htaccess or mix with my file ?
    my original file is the default wordpress file

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    

    The New file is correct ?

    # BEGIN WordPress
    
    RewriteEngine On
    RewriteCond %{SERVER_PORT} 80 
    RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L]
    
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    # END WordPress
    

    Thank you, Mirko

    • Jim

      I’m a little unclear what needs to be in the htaccess file to force SSL
      This is my current htacess

  45. g

    after changing the url in general settings, all css styles are gone, and the wp-login page to change this setting is not showing because of to many redirects. be aware before using this tut, I have to back up.

  46. Mark C

    Hi, what about if we’re using it only for the login.php page, where do we configure it?

  47. christopher

    Thank you for your article! I was wondering though, my website recently has suffered some problems with “too many redirects” error. I wonder if adding the .htaccess code you mentioned in the article for ssl redirect will make the problem worse? Some visitors to my website said they often see “this page isn’t redirecting properly” when they come to our website. Could it be that our customers are having trouble visiting our website because I don’t have that code in my .htaccess file?

  48. Melvin

    Hi! I was wondering if there’s a reason why you only want SSL on specific pages instead of the whole website? Could this be because of performance?

  49. Ahmed

    Hello Syed! Great tutorial. I just want to ask that when ssl error window appears in browsers. Whether its the time to login,shopping or everytime you visit specific websit….For example if I have a blog which don’t offer login or shopping whteher ssl certificate is required or not???

  50. Jaclyn Mamuzich

    Hello,

    For some reason our blog is not showing as https even though we have an ssl installed and I thought it was done before the migration but I could be wrong. I followed the steps in the article (greatly appreciated :) but for some reason when I complete all the steps, almost all of my styling disappears, specifically related to layout. Any suggestions?

    thanks!

    • Rob

      As with JACLYN MAMUZICH. I have followed all the steps and when the site is viewed in https:// all the CSS has gone. Any suggestions?

返信を残す

コメントありがとうございます。すべてのコメントは私たちのコメントポリシーに従ってモデレートされ、あなたのメールアドレスが公開されることはありませんのでご留意ください。名前欄にキーワードを使用しないでください。個人的で有意義な会話をしましょう。