To move an existing WordPress to secure SSL/HTTPS

It’s easy to get you existing WordPress installation to secure SSL/HTTP.

I think you know how to prepare the server or you isp do, else use Google.

Now to WordPress, there are tree step:

1. The settings in General: Configure-HTTPS-for-WordPress[1]

 

 

 

 

2. wp-config.php:
Write this in wp-config.php

define('FORCE_SSL_LOGIN', true);

Now you WordPress is on SSL but the HTTPS is broken. Forget Google it is not the templates fault, and forget plugin’s or rewrite – it kills the cat. The problem is all you old stuff, stored in the database. It’s full of http:// ‘s

3. Tweak you database, (backup is a good thing here):

The table YOUPREFIX_posts is full of ‘http://YOU_URI’. We are going to change them to ‘https://YOU_URI.

There are two columns: post_content and guid – Run these two sql updates

sql = UPDATE `YOUPREFIX_posts` SET `post_content` = REPLACE(`post_content`, 'http://YOU_URI', 'https://YOU_URI') WHERE `post_content` LIKE '%http://YOU_URI%';
sql = UPDATE `YOUPREFIX_posts` SET `guid` = REPLACE(`guid`, 'http://YOU_URI', 'https://YOU_URI') WHERE `guid` LIKE '%http://YOU_URI%';

You need YOU_URI or you break external links.

Maybe there are other tables e.g. Comments, I don’t use them, but it’s the same rumble as above.

And now you fly – or not. You probably have more than one plugins there is broken. You have to edit them or retire them. Often they is calling home for images and that break the HTTPS chain.

New stuff you put up is automatic made as https.

Lav din egen baderumspray

Træt af at betale en formue? Sådan en  fætter koster ca. 30 kr. for 750 ml eller 40 kr literen. Men man kan lave det selv, her er opskriften: 1 liter varmt kogt vand 1 brev vinsyrer (står på syltehylden i supermarkedet) 1 hættemål (30 ml) grundrengøring (det har du nok allerede, ellers brug 25 ml opvaskemiddel)(Det er eneste kilde til mærkelig kemi, så brug dit øko-opvask, hvis det skal være helt uden skadelige stoffer, men så skal du heller ikke bruge malerrens.) 10 ml 3 dbl. salmiakspiritus eller malerrens (hvis man bruger for meget her, tager det også malingen) Ryst det hele sammen i en flaske og genfyld sprayflasken. Hvis blandingen også skal bruges i køkkenet så fordobl punkt 4. Udgift ca. 10 kr. Har du ikke en brugt sprayflaske kan de købes i en tier-butik for en tyver.