{"id":257,"date":"2018-03-08T07:45:58","date_gmt":"2018-03-08T07:45:58","guid":{"rendered":"https:\/\/www.smarthost.eu\/blog\/?p=257"},"modified":"2019-06-21T07:52:02","modified_gmt":"2019-06-21T07:52:02","slug":"turning-on-the-ssl-certificate-in-wordpress-guide","status":"publish","type":"post","link":"https:\/\/www.smarthost.au\/blog\/turning-on-the-ssl-certificate-in-wordpress-guide","title":{"rendered":"Turning on the SSL certificate in WordPress &#8211; guide"},"content":{"rendered":"\n<p><strong>Turning on the SSL certificate in WordPress<\/strong><\/p>\n\n\n\n<p>If You want your site working on secure connection, or the method you use does not work fully, I encourage you to read this guide.<\/p>\n\n\n\n<p>A secure, encrypted connection using the SSL certificate and the https protocol is a desirable feature of the site, which is increasingly attracted by website users, but also browsers and search engines.  <br><br>So it is worth devoting a moment to adjusting your website to current trends. <\/p>\n\n\n\n<p>In this article we will show You step by step what to do to use installed on serwer SSL certificate on your WordPress site. <br><br>If you want a green padlock to appear in the browser, you need: an SSL certificate installed on the server (eg free Let&#8217;s Encrypt or Comodo \/ cPanel) and a setting for WordPress to display pages using the https protocol.<\/p>\n\n\n\n<h2><p style=\"background-color:#fe0004\" class=\"has-text-color has-background has-very-light-gray-color\">Manual correction (the only correct version of SSL inclusion in WordPress): <\/p><\/h2>\n\n\n\n<p>The best way to switch to a secure SSL connection is to update all entries in the database from http to https .<\/p>\n\n\n\n<p>If we use this method the improvement on https will be permanent, so you only need to make the change once and enjoy a secure connection.<\/p>\n\n\n\n<p>Another advantage of using this method is changing the creation of new entries in the future &#8211; each new entry will be created with the correct link in the database. <\/p>\n\n\n\n<p><strong>1. So lets start and in first step we need to go to backend of WordPress and then go to settings -&gt; general and change adresses from<\/strong> <strong>http to https <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"223\" src=\"https:\/\/www.smarthost.eu\/blog\/wp-content\/uploads\/2019\/06\/image-5.png\" alt=\"\" class=\"wp-image-281\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-5.png 1023w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-5-300x65.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-5-768x167.png 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<p><strong>2. Now we need to click save changes at the end of the site and then go to setting -&gt; permalinks and here also click save changes this will rebuild all links in database to safe links with https.<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"771\" height=\"390\" src=\"https:\/\/www.smarthost.eu\/blog\/wp-content\/uploads\/2019\/06\/image-1.png\" alt=\"\" class=\"wp-image-264\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-1.png 771w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-1-300x152.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-1-768x388.png 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/figure>\n\n\n\n<p><strong>3. Go to cPanel -&gt; File Manager, go to the main directory of our site and click Settings, select tick Show hidden files (dotfiles)<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1023\" height=\"332\" src=\"https:\/\/www.smarthost.eu\/blog\/wp-content\/uploads\/2019\/06\/image-3.png\" alt=\"\" class=\"wp-image-267\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-3.png 1023w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-3-300x97.png 300w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-3-768x249.png 768w\" sizes=\"auto, (max-width: 1023px) 100vw, 1023px\" \/><\/figure>\n\n\n\n<p><strong>4. Now find .htaccess file in your domain folder<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"660\" src=\"https:\/\/www.smarthost.eu\/blog\/wp-content\/uploads\/2019\/06\/image-4.png\" alt=\"\" class=\"wp-image-269\" srcset=\"https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-4.png 619w, https:\/\/www.smarthost.au\/blog\/wp-content\/uploads\/2019\/06\/image-4-281x300.png 281w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/figure>\n\n\n\n<p><strong>5. Open the .htaccess file by right-clicking on it and selecting Edit. We add the following lines at the beginning of the file. We leave the rest of the file content below the entries we added:<\/strong><\/p>\n\n\n\n<p><br><strong>Without the prefix www:\u00a0<\/strong><br>RewriteEngine On<br>RewriteCond %{HTTPS} !=on<br>RewriteRule ^ https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\u00a0<\/p>\n\n\n\n<p><br><strong>With the www prefix:<\/strong><br>RewriteEngine On<br>RewriteCond %{HTTPS} off<br>RewriteRule .* https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<br>RewriteCond %{HTTP_HOST} !^www\\. [NC]<br>RewriteRule .* https:\/\/www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]\u00a0 <br><br><\/p>\n\n\n\n<p>The above entries will redirect visitors to a secure connection if they enter via the http link instead of https.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Turning on the SSL certificate in WordPress If You want your site working on secure connection, or the method you use does not work fully, I encourage you to read this guide. A secure, encrypted<a class=\"read-more\" href=\"https:\/\/www.smarthost.au\/blog\/turning-on-the-ssl-certificate-in-wordpress-guide\">Continue reading<\/a><\/p>\n","protected":false},"author":4,"featured_media":259,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20,8,15,42,39],"tags":[115,113,117,119,116,114,118,38,63],"class_list":["post-257","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-hosting","category-security","category-security-leak","category-ssl-certificates","category-wordpress","tag-certificate","tag-connection","tag-cpanel","tag-guide","tag-htaccess","tag-safte","tag-ssl","tag-ssl-encryption","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/comments?post=257"}],"version-history":[{"count":22,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions"}],"predecessor-version":[{"id":287,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/posts\/257\/revisions\/287"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/media\/259"}],"wp:attachment":[{"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/media?parent=257"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/categories?post=257"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.smarthost.au\/blog\/wp-json\/wp\/v2\/tags?post=257"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}