Forcing HTTPS in WordPress

Step 1

sudo vi wp-config.php
define('WP_HOME','https://www.jeffholst.net');
define('WP_SITEURL','https://www.jeffholst.net');

Step 2

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

Step 3

Restart Apache

Bitnami

sudo /opt/bitnami/ctlscript.sh restart apache

Leave a Reply

Your email address will not be published.