Moving a WordPress Network Site to HTTPS

This article describes how to move an existing Worpress site which runs in a WordPress network from HTTP to HTTPS. It was tested with WordPress version 3.5 and an Apache web server 2.2.22.

Moving a web site from HTTP to HTTPS is basically not difficult. If you are using the Apache web server, you have to load the SSL module then modify the configuration of the appropriate virtual host from port 80 to 443 and add the appropriate SSL configuration statements. It should read similar to the following lines:

<VirtualHost *:443>
SSLEngine On
SSLProtocol all -SSLv2
SSLCertificateFile "/usr/local/etc/apache22/mydomain.crt"
SSLCertificateKeyFile "/usr/local/etc/apache22/mydomain.key"
SSLCertificateChainFile "/usr/local/etc/apache22/CA.crt"
ErrorLog /var/log/apache22/
CustomLog /var/log/apache22/ combined
DocumentRoot /usr/local/www/apache22/data

Please note that you need a private key (mydomain.key) and a valid SSL certificate (mydomain.crt). CA.crt is the certificate of the certificate authority (CA) who issued your certificate. Have a look at the Apache SSL/TLS Encryption1 page for more information.

If you would like to have all clients automatically redirected to your new HTTPS URL you may add the following virtual host:

<VirtualHost *:80>
Redirect /
ErrorLog /var/log/apache22/
CustomLog /var/log/apache22/ combined

Now login into your WordPress network admin panel and edit the settings of the site which should be moved to HTTPS. There are at least two options (Siteurl and Home) which read the full hostname including http:// which has to be changed to https://. Save the changes and logout again.

You should now be able to view and login to your site using HTTPS. If you had permalinks in use in a different than the default format you will notice that you cannot view any article. You will get the error message “404 Page not found.”.

To fix it login to the admin panel of your site and got to Settings->Permalinks. Select the default and save the changes. Now select your favorite permalink format and save it again. Now, everything should work fine 🙂