Forcing SSL on WordPress Site

Avatar
  • Answered
I am attempting to force SSL on a WordPress site in order to use a FirstData payment gateway with the WooCommerce shopping cart plugin. I have followed the instructions in your support article for forcing SSL using the .htaccess file. It seems to be working (URL shows HTTPS) unless I am logged into WordPress. When I am logged into wordpress it no longer goes to HTTPS and the WooCommerce plugin shows an error in the WordPress dashboard "First Data Error: WooCommerce is not being forced over SSL; your customer's credit card data is at risk." There was already a ReWriteEngine command in the .htaccess file for WordPress, so I put the SSL commands above the WordPress commands. Here's what I have in the .htaccess file: # BEGIN force dedicated SSL RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://whileyouheal.com//$1 [R,L] # END force dedicated SSL # BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
Avatar
JeffMa
Hello, Thanks for submitting a question about Forcing SSL. Because of how Wordpress and Woocommerce work, it can be a bit different at times. The Force SSL option is used for forcing SSL on specific pages such as the checkout page. To enable it, it will need to be enabled in Woocommerce as well. More information on this may be found at the following: Setting up SSL with WooCommerce Regarding forcing SSL for your Wordpress dashboard, it will require additional steps as well. This can be found at the following: Wordpress Administration Over SSL