New answers tagged


Add this rule to the top of .htaccess: # BEGIN Force SSL # This should be the first rule before other rules <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L] </IfModule> # END Force SSL This should be before WordPress' rules.


I've used Really Simple SSL to my all of clients sites and it works very fine. If you dont want to modify code, simply install this plugin and config it.


You can replace your URLs in PHPMyAdmin instead - make sure you have backed up your database though. You'd need to change this code and run it: UPDATE wp_posts SET guid = replace(guid, '',''); UPDATE wp_posts SET post_content = replace(post_content, '', ''); ...


This can also happen if WordPress is hosted behind a reverse proxy that provides SSL. Paste the following in your theme's functions.php: define('FORCE_SSL_ADMIN', true); // a comma-separated list e.g. http,https if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false) $_SERVER['HTTPS']='on';

Top 50 recent answers are included