Continued from this post. As I use Sub-directory type of WordPress multisite network, the steps of moving entire WordPress sites to HTTPS might be slightly different from single type cases.
I used this opportunity to change some other things.
First, I’ll write about some other things.
- I re-encoded all old videos on my sites because of adjusting to HTML5. And then, I removed my old flash player file(flvplayer.swf) from the plugins directory. I edited Root htaccess File of BPS for the flvplayer.swf.
Actually, we don’t need flash players on web sites anymore, but most of sites still use flash players. Because if you have a lot of videos on your sites and their encode types are not supported by HTML5 video tag default, you have to re-encode them or customize something. Re-writing HTML source also takes time a little. I think the work takes significant time and money maybe. My sites has several videos only, but they took my time a day or so. Very bother.
- I’ve used a conf file of Apache for the access control of my server. But I stopped it and I am going to use a htaccess file for this purpose. To use htaccess for this purpose is more common use than to use a conf file.
For this, I mean that I use
requirein the htaccess file, I added
Now I’ll write about WordPress.
- I edited all
http://o6asan.com/in my sites to
/. Of course, I can use
/. But I think
/is better than
//o6asan.com/because I don’t need to re-edit them even if I change my domain name someday.
I used Search Regex for this. Most of them were replaced by this plugin, but the rest I had to replaced manually.
- I removed define(‘FORCE_SSL_ADMIN’, true); from my wp-config.php.
- I removed the following lines from my http-class.php because I don’t use self-signed certificate and client authentication at this time.
curl_setopt( $handle, CURLOPT_SSLCERT, 'the exact path of clientcert.pem' );
curl_setopt( $handle, CURLOPT_SSLKEY, 'the exact path of clientkey.pem' );
- This No.4 is most important for moving WordPress multisite network to HTTPS. Even if your WordPress is very new, you cannot avoid this step.
If your WordPress is very new and is installed as on HTTPS, your main site has the URL like
https://example.com. But if you want to move your WordPress network from HTTP to HTTPS like me, you have to change
HOMEof your main site from your database. Of course, you need to log your SQL server in before this step.
You can find
HOMEvalues on the table
wp-options. If you find them, replace
About Child sites, you can change them from Network Admin’s Dashboard. Log on as Network Admin, go
Sitespage, and click
https://example.comor something like that, and on
Settingspage do same things for
You also need to change
Fileupload Urlabout the main site.
About Child sites, you need the above steps even if your WordPress is very new and is installed as on HTTPS. If you don’t, you will have some 404 from WordPress.
- Reboot Apache. Now my entire WordPress is on HTTPS.