RHEL8: Configure wordpress with ssl

WordPress database needs to be altered.

UPDATE wp_posts SET guid = replace(guid, 'http://','//');
UPDATE wp_posts SET post_content = replace(post_content, 'http://', '//');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://','//');

Edit your virtual host file

sudo vi /etc/httpd/sites-available/domain.se.conf
<VirtualHost *:443>
    SSLEngine On
    SSLCACertificateFile /etc/letsencrypt/live/domain.se/fullchain.pem
    SSLCertificateKeyFile /etc/letsencrypt/live/domain.se/privkey.pem
    SSLCertificateFile /etc/letsencrypt/live/domain.se/cert.pem

    ServerName www.domain.se
    ServerAlias domain.se
    DocumentRoot /var/www/domain.se/html
    DirectoryIndex index.php
    ErrorLog /var/www/domain.se/log/error.log
    CustomLog /var/www/domain.se/log/requests.log combined
</VirtualHost>

Verify https://domain.se is working and you can login on wordpress.

use plugin Really Simple SSL to activate SSL on wordpress

Leave a Reply

Your email address will not be published.