Setting Up SSL for WooCommerce / E-Commerce
SSL (HTTPS) is mandatory for any website that takes payments. Browsers show a warning for checkout pages without SSL, and most payment processors require it.
Install SSL via DirectAdmin
- Log in to DirectAdmin → SSL Certificates → select your domain.
- Click Free & automatic certificate from Let's Encrypt.
- Tick your domain and
wwwsubdomain. - Click Save.
Force HTTPS in WordPress
After installing SSL:
-
WordPress Admin → Settings → General — change both URLs to
https://. -
Add to
public_html/.htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- If you use Cloudflare, set SSL mode to Full (Strict).
Fix Mixed Content Warnings
After switching to HTTPS, some images or scripts may still load over HTTP ("mixed content"). Fix with:
- Better Search Replace plugin (WordPress) — replace
http://yourdomain.comwithhttps://yourdomain.comin the database. - Or run via WP-CLI:
wp search-replace 'http://yourdomain.com' 'https://yourdomain.com' --all-tables
Verify SSL
Check your certificate at sslchecker.com or SSL Labs.
A grade of A or A+ is ideal.