Buch & Berger

  • Angebot
  • Agentur
  • Blog
  • Kontakt
  • Search

SSL Setup for WordPress

Requirements: A SSL-Certificate, e.g. a free one from Let’s Encrypt.

Manual Setup

** Make sure you have a valid SSL certificate set up.

** Change WP Admin Settings: In your WordPress backend go to Settings > General and update your WordPress and site URL address fields to „https://…“

** Edit wp-config.php File: Force both logins and access to the WordPress admin area to use TLS/SSL. Add to the wp-config.php:

define('FORCE_SSL_ADMIN', true);

** Edit .htaccess File: Set 301 redirect, so that anyone visiting your site will be redirected to https. Edit the .htaccess file. Enter in the correct server port if it isn’t 80. The snippet goes before the code block that starts with „# BEGIN WordPress“.

# Redirect to HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

If you are on nginx servers, use this instead:

server {
listen 80;
server_name yoursite.com www.yoursite.com;
return 301 https://yoursite.com$request_uri;
}

** Finally run a search and replace in the database, changing „http://www.yoursite.com“ to „https://www.yoursite.com“.

Using a Plugin

Among others, there’s the popular and reliable Really Simple SSL plugin for WordPress. Unfortunately it caused issues with the wptexturize() WordPress function on my sites, so I stopped using it.

Troubleshooting

** The browser reports too many redirects, respectively „Really Simple SSL“ cannot detect the certificate.

Check cloudflare or other third party tool SSL settings, that may result in a redirect loop.

** Site shows a white screen of death.

Check SSL certificate. Wildcard certificates sometimes don’t work as expected.

Tags: SSL, TLS, HTTPS

Bearbeitet: 2019-10-14
Veröffentlicht: 2017-05-26
Rubrik: Developer Notes

Stefan Buchberger

Über den Autor

Stefan Buchberger beschäftigt sich seit vielen Jahren mit der Präsentation, Verbreitung und Kommunikation von Inhalten. Er war vor allem als Buchverleger aktiv.

Heute gilt seine Aufmerksamkeit einer nachhaltigeren Form der Webentwicklung, welche die Inhalte zurück in den Fokus rückt.

Seitenleiste

Neue Beiträge

SiteGround: Renewal Reminders

Sobald sich die Vertragslaufzeit für einen SiteGround-Service (z.B. Hosting oder Domain) ihrem Ende nähert, erhalten …

Wartungsbericht: Begriffe erklärt

Unsere Wartungskunden erhalten regelmäßig einen individuellen Wartungsbericht für ihre Websites. Einige Begriffe, die wir darin …

Internationale Literaturdialoge

Das Projekt Internationale Literaturdialoge möchte innovative Kooperationsprojekte österreichischer Literaten mit Kreativen im Ausland ins Leben …
Mann skizziert Projekt auf Tafel

Wege zur Website: Nach Maß und von der Stange

Websites entstehen individuell und nach Maß oder auf Basis bestehender Vorlagen. Vielfach aber: sowohl als …
Boy singing in microphone

Testimonials: Das sagen unsere Kunden

Im Mittelpunkt eines Projekts steht für uns selbstverständlich die Zufriedenheit des Auftraggebers. Wir freuen uns …

Newsletter

Unser Newsletter mit Tipps und Angeboten erscheint wenige Male im Jahr. Infos zu Versand und Verarbeitung erhalten Sie in unserer Datenschutzerklärung.

    nav-social-menu

    • LinkedIn
    • RSS
  • Impressum
  • Datenschutz
Top ▲
Top ▲
Finde

Zeige alle ...

Generic filters