{"id":1669,"date":"2019-04-04T21:38:14","date_gmt":"2019-04-04T20:38:14","guid":{"rendered":"https:\/\/www.nethosted.co.uk\/blog\/?p=1669"},"modified":"2022-02-09T19:30:44","modified_gmt":"2022-02-09T19:30:44","slug":"how-to-run-wordpress-over-https-ssl","status":"publish","type":"post","link":"https:\/\/www.nethosted.co.uk\/blog\/uk-web-hosting\/how-to-run-wordpress-over-https-ssl","title":{"rendered":"How to run WordPress over HTTPS SSL"},"content":{"rendered":"<figure class=\"wp-block-image\"><\/figure>\n\n\n<p><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/img\/svg-logo-only\/wordpress-blue1.svg\" alt=\"\" height=\"100px\">\n<p>Once you\u2019ve had your <a href=\"https:\/\/www.nethosted.co.uk\/blog\/internet-security\/how-to-secure-your-site-using-https-with-an-ssl-certificate\">SSL certificate installed<\/a> and have verified it\u2019s working by manually going to https:\/\/ on your domain you now need to configure your website to force any connections to load over HTTPS.<br><br>In  WordPress you can do this simply by going to the admin interface &gt;   Settings &gt; General. Here you will see two settings we need to change   \u201cWordPress Address (URL)\u201d and \u201cSite Address (URL)\u201d. By default they   will start with http:\/\/, you need to change these to https:\/\/. <br><\/p><\/p>\n\n\n<p><!--more--><\/p>\n\n\n<p><p>You can see how simple this step is below by viewing the images below. <\/p><br><\/p>\n\n\n<div id=\"su_slider_69f512c685cde\" class=\"su-slider su-slider-centered su-slider-pages-no su-slider-responsive-yes su-lightbox-gallery\" style=\"width:100%\" data-autoplay=\"0\" data-speed=\"600\" data-mousewheel=\"true\"><div class=\"su-slider-slides\"><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/Settings-General.png\"  title=\"Settings-General\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/Settings-General-1200x600.png\" alt=\"Settings-General\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/Settings-Changed.png\"  title=\"Settings-Changed\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/Settings-Changed-1200x600.png\" alt=\"Settings-Changed\" \/><\/a><\/div><\/div><div class=\"su-slider-nav\"><div class=\"su-slider-direction\"><span class=\"su-slider-prev\"><\/span><span class=\"su-slider-next\"><\/span><\/div><div class=\"su-slider-pagination\"><\/div><\/div><\/div>\n<p style=\"font-size:12px; text-align: right; margin-top: -20px; font-style: italic;\">Click the image above to view in full size. <\/p>\n\n\n\n<p>This will now make any link in your WordPress site utilise https:\/\/. <br><br>This will not automatically redirect people from http:\/\/ to https:\/\/ unless they click a link on the site. To force a redirect to https without using any plugins in WordPress we simply add the following code to our .htaccess file above the default WordPress code:<\/p>\n\n\n\n<pre class=\"wp-block-code\" style=\"font-size:20px; border-radius: 16px; border: 1px solid #ccc; overflow: auto;\"><code>#Force SSL on Entire Site\nRewriteEngine On\nRewriteCond %{HTTPS} off\nRewriteRule (.*) https:\/\/%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<\/code><\/pre>\n\n\n\n<p>We can now simply add this via the File Manager in cPanel, to do this login to cPanel and go to the Files section and select File Manager. Double click on the line with &#8220;public_html&#8221; to enter the directory where your website files are located. <br><br>We now want to edit the .htaccess file, if this is not present we need to go to settings in the top right. Now toggle the option called &#8220;Show Hidden Files (dotfiles)&#8221; and press save.<br><br>You should now see a .htaccess file, click this once and press edit on the top bar. A prompt will appear about encoding check, simply press edit to continue. You can now copy\/paste the code in below the original .htaccess content. <br><\/p>\n\n\n<div id=\"su_slider_69f512c686a23\" class=\"su-slider su-slider-centered su-slider-pages-no su-slider-responsive-yes su-lightbox-gallery\" style=\"width:100%\" data-autoplay=\"0\" data-speed=\"600\" data-mousewheel=\"true\"><div class=\"su-slider-slides\"><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager.png\"  title=\"FileManager\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-1200x600.png\" alt=\"FileManager\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Select.png\"  title=\"FileManager-Select\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Select-1200x600.png\" alt=\"FileManager-Select\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Missing.png\"  title=\"FileManager-Missing\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Missing-1200x600.png\" alt=\"FileManager-Missing\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-ShowHidden.png\"  title=\"FileManager-ShowHidden\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-ShowHidden-1200x600.png\" alt=\"FileManager-ShowHidden\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Edit.png\"  title=\"FileManager-Edit\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Edit-1200x600.png\" alt=\"FileManager-Edit\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-EditContinue.png\"  title=\"FileManager-EditContinue\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-EditContinue-1200x600.png\" alt=\"FileManager-EditContinue\" \/><\/a><\/div><div class=\"su-slider-slide\"><a href=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Save.png\"  title=\"FileManager-Save\"><img decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2019\/04\/FileManager-Save-1200x600.png\" alt=\"FileManager-Save\" \/><\/a><\/div><\/div><div class=\"su-slider-nav\"><div class=\"su-slider-direction\"><span class=\"su-slider-prev\"><\/span><span class=\"su-slider-next\"><\/span><\/div><div class=\"su-slider-pagination\"><\/div><\/div><\/div>\n<p style=\"font-size:12px; text-align: right; margin-top: -20px; font-style: italic;\">Click the image above to view in full size. <\/p>\n\n\n\n<p>An alternative solution to using this .htaccess code would be to use a WordPress plugin that replicates the same behaviour but directly within WordPress. An example plugin is <a href=\"https:\/\/en-gb.wordpress.org\/plugins\/really-simple-ssl\/\">Really Simple SSL<\/a> which is actively receiving updates from it&#8217;s developers and is well reviewed. <\/p>\n\n\n\n<p>If you encounter issues while using the plugin Elementor, we would advise taking a look at their &#8220;Replace URL&#8221; tool which can be found under; Elementor > Tools > Replace URL Tab<\/p>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2022\/02\/elementor-590x172.png\" alt=\"\" class=\"wp-image-1815\" width=\"657\" height=\"191\" srcset=\"https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2022\/02\/elementor-590x172.png 590w, https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2022\/02\/elementor-300x87.png 300w, https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2022\/02\/elementor-768x223.png 768w, https:\/\/www.nethosted.co.uk\/blog\/wp-content\/uploads\/2022\/02\/elementor.png 1062w\" sizes=\"(max-width: 657px) 100vw, 657px\" \/><\/figure>\n\n\n\n<p>If you need any assistance with enabling https on your install, feel free to raise a support ticket via your Client Area and we&#8217;ll be happy to help. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Once you\u2019ve had your SSL certificate installed and have verified it\u2019s working by manually going to https:\/\/ on your domain you now need to configure your website to force any connections to load over HTTPS. In WordPress you can do this simply by going to the admin interface &gt; Settings &gt; General. Here you will [&hellip;]<\/p>\n","protected":false},"author":12,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[138,9,8],"tags":[],"aioseo_notices":[],"views":4198,"_links":{"self":[{"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1669"}],"collection":[{"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=1669"}],"version-history":[{"count":106,"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1669\/revisions"}],"predecessor-version":[{"id":1816,"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/posts\/1669\/revisions\/1816"}],"wp:attachment":[{"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=1669"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=1669"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nethosted.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=1669"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}