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. Kevin Bollhorst

    Thank you for this informative article. I am looking into switching my blog to SSL. The web host provider is Bluehost and I am using the free Cloudflare CDN Service. I have one question. Will Cloudflare’s free service support Bluehost’s Free SSL certificate?

    • WPBeginner Support

      Hi Kevin,

      Please contact Bluehost or Cloudflare support, you may need additional configuration for SSL to work with your free Cloudflare CDN.

      管理者

  3. Moritz Steiger

    I followed these instructions and now it has screwed my site, nothing works. I now get the ‘White screen of death’ my host won’t help as they say it is a coding error and I am left in limbo.

    • WPBeginner Support

      Hi Moritz,

      We are sorry to hear that. Please undo the steps you took while following the tutorial one by one and that should fix your site to normal.

      管理者

  4. Chandra

    Hi,

    Thank for you for such an detailed article on a very hot topic.

    I followed manual steps but got mixed content error. And seems because of this I’m not able to see WP login page. I tried clearing cache on dreamhost but message displayed is “Unable to connect to CloudFlare”.

    I’m using Dreamhost and Cloudflare is enabled.

    Could you please help or need more details to fix the issue? Do you also offer paid service to secure another site of my mine?

    Thank You.

  5. Richard

    Hi,

    Just followed through the manual procedure without problems – Thanks!

    However, I’ve noticed that If I type the old http:// address into the browser for any page except for the homepage then the old http:// page loads.

    Then when I click a link to another page it goes to a https:// page is this normal?

    Does it indicate a problem with the redirect?

    • WPBeginner Support

      Hi Richard,

      No it is not. Most likely the redirects in your .htaccess file are not working. Try copying the code and adding it to your .htaccess file again and see if this resolves the issue.

      管理者

      • Richard

        Hi,

        Fixed It thanks. I’d originally inserted the Code at the end of the htaccess file. Moved It Up to before the WP section and everthing now works correctly.

        Thanks for your help and for the concise guide. I’d been putting this off for a while.

  6. Daniel

    With regard to the last step in Google Console, on the “Change of Address” page, I am getting a “no available sites” message, but I have double-checked that my http and https versions are verified. When I click on “add it now” I’m just getting verification information. What do I do?

  7. Emily Randall

    I just installed a LetsEncrypt cert on my website, and I’m getting a bunch of insecure content errors that shouldn’t be happening. Although the theme is using get_template_directory_uri() to load its styles and scripts, those styles and scripts are still being loaded via http, not https. Even if I hard-code the https url in the function to load the styles/scripts, they’re loaded via http.

    Do you have any idea what’s happening here? As far as I can tell, everything is set up properly, but it’s not working.

  8. skaur

    Hi,
    I have purchase SSL and configured by my hosting. It shows https in url. when I do https under General settings in wordpress admin area, my website goes down, only homepage and after it I am not able to login the admin area too. I added the code in htaccess file too with https under settings.

    Could you help me with this?
    Thanks

    • WPBeginner Support

      Hi Stan,

      Yes, we are aware of that. However, we still recommend taking this step. It is safe and will not have any negative impact on your site.

      管理者

  9. Lindsey Bell

    I use Bluehost for web hosting and just set up my wordpress site with their free SSL certificate through the Bluehost page. There was a page on the Bluehost site to activate it for my WordPress site. Now, it appears that my site is already set up with the https. Do I still need to install the plug in, or is mine already taken care of? Thanks so much for the help!

  10. Farukh hussain

    Hi,
    I was founding this issue and you just uploaded this article. Thanks alot.
    Can you please help? I did not change my primary site on search console. I added a new property with https and then created a set for all of them. Will it work fine for ranking or I need to follow your instructions only???

    • WPBeginner Support

      Hi Farukh,

      Adding HTTPS property and then redirecting users from HTTP to HTTPs will work fine.

      管理者

  11. Paula Jones

    So I have to purchase a dedicated IP address to use the free SSL certificate?

    • WPBeginner Support

      Hi Paula,

      No, you don’t need a dedicated IP address to use free SSL certificate.

      管理者

  12. Chris

    I don’t understand why a redirect is still necessary once the hosting service installs the certificate for the site. I’m assuming that a WordPress site initially configured with the HTTPS protocol does not require a redirect. Is it a matter of registering a domain with or without the proper protocol?

  13. James Katt

    The problem of buying an SSL certificate and having it installed is that you will need to also purchase a fixed IP address from your Web Host. This is an additional yearly cost on top of the yearly cost of the SSL Certificate. For each website you create you have to buy an SSL certificate and a fixed IP address. This will add up tremendously the more websites you have.

    Because of this, I prefer creating websites on hosts that Automatically give you a Free SSL certificate. These days, the ones that don’t simply want to gouge you for money.

  14. Rupam krishna Bharali

    Can the internal configuration of SSL and HTTPS help to reduce the SSL loading time during a request? When I tested my website with SSL enabled and it took about 455 ms to load “the SSL separately”, but when I disabled the SSL total loading time decreased to 1.3s. So two question I want to ask you guys,

    1. Can I go without an SSL just because I have a Simple blog, no commercial stuff, and web payments?

    2. Can the configuration of SSL internally with the help of .htaccess file reduce the loading time of SSL?

    • WPBeginner Support

      Hi Rupam,

      1. You can but soon Google will start warning users about websites not using HTTPs, this would affect your website’s traffic.

      2. Yes, it can. You can also try to avoid plugins to fix mixed content issues. We have noticed that often such plugins increase page load time significantly.

      管理者

  15. Adeshewa

    Could someone help please, I followed the direction of the first one all my pages are secure except for one on the menu. Whenever I clicked on it as a customer it says your connection to this website isn’t encrypted.

    • Troy

      Not sure if you got this fixed yet, but I was having the same issue. I found that using the SSL Insecure Content Fixer plugin corrected it. Worth a shot!

  16. Shyam

    Hi wpbeginner,
    My website did not have ssl certificate. I changed the http to https now it is showing ssl not enabled. What do I do?

    • Zohaib Sadique

      If you are working in WordPress then install the plugin named “really simple SSL” to force up your SSL. I hope you will get the idea. Thanks for reading.

  17. Erin

    Thank you!! Finally I have my SSL certificate recognised by wordpress and I couldn’t have done it without the info provided here. So a BIG thanks for helping me out!

  18. Farrukh Ghafoor

    I have added the code into the .htaccess file but when I refresh my page in WordPress it comes up with a “Your connection is not private” message. I have to click on “Back to safety” and the icon does not appear in the website url. Please help me to fix this. Thanks

  19. Marco

    Where do you install WordPress? public_html or private_html ?

  20. Cecilia W

    I followed the first step, adding the https: to the website name and immediately the webpage redirected me to a sit not secure error prompt and now I can’t access my dashboard at all to finish the process or do any bug fixes. How do I reverse the first step?

  21. Mark Lewis

    Thank you for this helpful article

  22. Tammy

    I have used your site for a resource for a long time. Therefore, I was confident when I followed the directions in this article–to the letter. I used it on a client’s site. Which seemed to work perfectly. Then my own site. However, now I am locked out of both sites. I have a backup of them using the WP all-in-one migration plugin, but no way to access the dashboard.
    One site says too many redirects. Even when going to an incognito window or a browser where I’ve recently deleted all history, it still says delete all cookies. The other site says can’t connect to server.
    Any suggestions for me? I am pretty screwed at this point.
    Thanks,
    Tammy

  23. Sukka

    Does my backlinks gets lost after change. Kindly some one clears it to me.
    As when I checked my website through semrush https is showing 0 backlinks but I actually have 1000+ backlinks.
    Please someone guide.
    Thanks.

  24. dan

    Why doesn’t the .htaccess stuff for Apache contain the 301 redirect information?

  25. Divine

    This was really helpful. Though after doing it, it showed 404 in most pages but when I updated the paramalink…it was solved

  26. Pipy

    Please, I am looking for some ways that I can do to secure the WordPress website from hackers and becoming a secure site. Suggest please

  27. Ravi

    Hey wpbeginner team why you guys are not using ssl certificate.?

    Waiting for your answer.

    • Reo

      Let me answer that. WPBeginner no need to use SSL because they don’t have a login/signup page and ecommerce.

      • SaifZiya

        But, hasn’t Google now announced that having an SSL certificate can boost your rankings in SERPS?

  28. Cristi Adam

    Thank you for info man, great article, it really fixed my issue

  29. Amar Patel

    after adding ‘s’ to the WordPress URL and site URL redirection is working properly…I removed the ‘s’ and put redirection code in my .htaccess then browser saying error too much redirection.

    If i go for first option that will be fine or not ?….how can in know my redirection working properly ?

  30. Nalin

    Hi,

    Is it necessary to include the code in htaccess? I am using wordpress and checked with whynopadluck and manually changed the link of the images with non https link. After that, it shows all items are secure. Do I still need to update htaccess? Doesn’t WordPress redirect http to https by itself?

    • Mottaqi

      If I install a new WordPress installation for a new site should I do all of these???

  31. Abiola Oyeniyi

    Cloudflare SSL or Let’s Encrypt which one is the best. I had to switch to Cloudflare SSL

    • Mukesh Patel

      If you are using cloudflare than you can easily switch your site to HTTPS. If you are using free plan then their are no option available for use custom SSL. If you install Let’s Encrypt SSL on origin server, Even after that browser will show Cloudflare SSL.

  32. Richard

    Very helpful article. However, I am wondering if I would still be required to update the .htaccess file (per your example) if I am using the plugin: “Really Simple SSL” that you recommended in a newer article. (Also, would this plugin take care of changing the WP General Settings?)

    Thanks!

  33. James

    We completed step 1 and now we cannot login to our wordpress to do step 2 or 3. And the only page that works on our site it the home page. All other pages try to pull up as https and gives an error. We have to manually take the s out so it’s http before the page will show.

    We’ve undone the first step and still cannot login. We are dead in the water here.

  34. Jerome Williams

    Worked great. For people with self-signed certs yeah, you will get an error. But if you get that warning, that means you followed this tutorial correctly! All you have to do now is resolve your SSL signing issue and you’re set.

  35. Bhupesh Pant

    Hi After making the above changes I am not able to open my site, I am not even able to login to my wp- admin page to revert https to http please help.

  36. Enyel Cuadro

    (GoDaddy)
    define(‘FORCE_SSL_ADMIN’, true);
    after adding this line then reload the website, I got error that “your connection is not private”. I am using self-signed certificate. Please help how to setup https using self-signed certificate.

    • Kimball

      Do a view source on your page. See anything that starts with http:// like css, js, or image files? Those will have to be changed in your content or template.

    • Mukesh Patel

      Do not use self-signed-certificate. You can choose Let’s Encrypt SSL, Free Comodo Certificate or Cloudflare SSL. These all are free of cost.

  37. Ali O

    I know that WPBeginner is great, but you exceeded my expectations and totally saved my week today with this how-to guide! Love you guys!

  38. Red Strivens

    Remember to change the Port as well !!!!

  39. Mari-Lyn

    Thank you for the simple explanation of making a site ssl compliant.

  40. Bala krishna reddy mogiligundla

    Sir i have stuck in a problem i hope you could help , i have a hosting which is worth $300 in godaddy i have added one website and bought an ssl for that …again after some days i have added secondary site avantsolutions.ca to same hosting . i have been told that i cannot buy additional ssl to this hosting and suggested me to buy one unified ssl which costs around 350$ .Please dont mind me saying this but i have already spent alot and cant afford that ..what other options do i have

    • WPBeginner Support

      Hello Bala Krishna,

      Please try to resolve it with your hosting provider through live chat or phone support. If you have purchased a hosting plan that doesn’t meet your needs, then you can ask them for a refund. Most hosting companies have some sort of refund policy which is usually valid during the first 30 days of signup.

      管理者

  41. Lydia

    Hi, my host offers the Let’s encrypt so I have gone that route, as this is all new I have created a new site to practice on which i set up the lets encrypt shared ssl. Now I am trying to move it from http to https I did install the simple ssl plugin but it did not find my ssl certificate, not sure if it is set to work with shared lets encrypt so, i found another plugin called wp encrypt which is designed specifically for the shared lets encrypt but i am not able to get it to connect the way it instructs. I have checked my outgoing connections and they are clear. Would appreciate any help in working this process out, so I can get started on the shift. Thanks

  42. Max

    Followed the instructions and basically bricked my website.

    between 404 errors, database connection errors and more and more errors… that 301 redirect causes way too many problems.

  43. Brian Luff

    Thanks for the article, which is interesting and informative. There’s one problem it doesn’t mention, and no-one else has commented so I wonder if I’m missing something.

    I bought a third-party SSL certificate from the hosting company and switched to HTTPS. After making the .htaccess changes, everything worked fine, except…

    None of the pages get a green padlock. Instead, there’s an info link that says the pages are ‘partially secure’.

    I checked with the hosting company, and they said I had to change every internal link to HTTPS, and the URL of every image likewise. If I don’t do that, then no green padlock.

    Manually making all those changes would take me months even if I worked 8 days per week, 25 hours per day. If I’d known that at the outset, I would not have made the change to SSL/HTTPS in the first place.

    Is what I’m being told correct? If so, is there any (even semi-)automated way of updating all the links in the site?

    • WPBeginner Support

      Hi Brian,

      You can install Really Simple SSL plugin and it will take care of partially insecure links on your website.

      管理者

      • Brian Luff

        Many thanks for that, I’ll remember it for next time (I have a personal blog I’m thinking about moving from .com to .org). In this case I already bit the bullet. It turns out I was exaggerating but it did take me several hours to go through 200 posts and 70 pages manually changing all the internal links and the image references. At the end of all that, there was still no green padlock, but I found the last few instances using a useful (free) tool (which may or may not be a useful adjunct to your plugin). I now have another question, but I’ll post it separately for clarity. Thanks again for responding.

    • Felix

      Hi Brian,
      There is another ultimate solution for that problem. Try to make Backup of MySQL database of your site manually by the procedure:
      https://www.wpbeginner.com/beginners-guide/how-to-make-a-wordpress-database-backup-manually/
      OR.
      Almost any hosting provider has an option such as “download MySQL database” or “dump MySQL database”. You will download .sql file. After that open that .sql file in text editor such notepad++ and try the find-replace function to find “http” and replace it by “https”. It will take a second.

  44. hiren

    hii,

    I does the changes as above in my site but now it is getting problem ” Error establishing a database connection”

    so i’ve no idea where to do changes .

    pls help. thanks in advance.

  45. Lisbeth

    What to do if I want to revert back from https to http?

    There aren’t many guides on this one. Please help.

  46. Tom W

    A quick update – there is a free plugin called Really Simple SSL that you can download, activate, and it works great!

    Many thanks to the author.

  47. Jason

    I tried this and had a problem. I switched from a basic html/htm site to wordpress so my .htaccess has a lot of 301 redirects. No I’ve bought an SSL In the current setup if I add RewriteRule ^(.*)$ to the .htaccess file then if anybody attempts to browse the site they get “the webpage has a redirect loop” error. So I’ve had to take out that line of code. Anything I can do?

  48. Avinash Kumar

    I am using cloudflare for https and want to know how to display “secure lock sign” before the https:// and I also want to know why you are not using https ?

    • hiren

      Just install a Really simple SSL plugin and active it. and change in the yor site general setting it is Setting >> General >> https://example.com

    • Mukesh Patel

      Hello Avinash Kumar.
      wpbeginner don’t use HTTPS because they don’t have any login, signup page and also don’t sale anything.

  49. Bart Nash

    When configuring the SSL certificate, is it better to add the www to https:// or leave off the www when setting up a new wp site.

  50. tim

    Reason when I complete all the steps. Thank you for your article! I was wondering though, my website recently has suffered some problems with.

返信を残す

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