Is there a way to force ssl on certain pages
Use the admin-ssl plugin. For stuff outside of wp, use rewriite rule in apache
Use the admin-ssl plugin. For stuff outside of wp, use rewriite rule in apache
Solution 1: Enable mod_header on the server and added this rule to my appache2.conf file: <IfModule mod_headers.c> RequestHeader unset HTTPS </IfModule> Solution 2: Or you need to add the code to fonction.php file of your current theme: function https_chrome44fix() { $_SERVER[‘HTTPS’] = false; } add_action(‘init’, ‘https_chrome44fix’,0);
You could run a script to UPDATE all urls and guids to https, if you want a clean setup. But also consider alternatives such as: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] </IfModule> In wp-config.php for the backend: define(‘FORCE_SSL_ADMIN’, true); In wp-config.php for the frontend (or run a db UPDATE script): … Read more
There are 2 things you must do. If you are using Apache server go to .htaccess and change the Rewrite and RewriteBase engine to RewriteEngine On RewriteCond %{SERVER_PORT} ^443$ RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L] RewriteBase / RewriteRule ^index.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] If you are using Nginx something … Read more
You can try these: 1. make sure the values changed in database If you can’t login to wp-admin > settings to confirm that, you can go to database, wp_options table and look for siteurl and home values 2. add code to wp-config.php Add these lines to wp-config.php define(‘WP_HOME’,’http://example.com’); define(‘WP_SITEURL’,’http://example.com’); 3. Clear your cache Make sure … Read more
This is because the site_url and homeurl of your original installation are set to HTTPS in the database, so you can’t access your website on localhost unless you: Change these values to non-ssl Install a SSL certificate on localhost I will only explain the first case since installing a certificate is out of this community’s … Read more
Well, at my situation… I downloaded the company website from production to localhost because I was needed to prepare a development environment for some developers. The production is using https:// and at localhost http://, and when I ran it the first time on localhost, it always redirected me to the https://. And, I have managed … Read more
There are plugins to set the site to SSL. Why not use one of them? And you do have an SSL certificate installed and active?
Check your wp-config.php file for lines like: define( ‘WP_SITEURL’, ‘https://example.com’ ); define( ‘WP_HOME’, ‘https://example.com’ ); Also check your database’s {prefix}_options table: SELECT * FROM wp_options WHERE option_name=”siteurl” OR option_name=”home”; …assuming that your database’s prefix is wp_.
Special thanks to user42826. According to the codex: If WordPress is hosted behind a reverse proxy that provides SSL, but is hosted itself without SSL, these options will initially send any requests into an infinite redirect loop. To avoid this, you may configure WordPress to recognize the HTTP_X_FORWARDED_PROTO header (assuming you have properly configured the … Read more