Title: Steps for Changing WordPress Multisite installation SSL secuire :  http to https
Last modified: August 24, 2016

---

# Steps for Changing WordPress Multisite installation SSL secuire : http to https

 *  [kbeebalm](https://wordpress.org/support/users/kbeebalm/)
 * (@kbeebalm)
 * [11 years ago](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/)
 * Hello,
 * I am trying to learn the steps to change a WP multi-site to be SSL enabled.
 * I was told by someone that i could just change the Settings by going to the Admin
   dashboard, going to Sites, and then for each site listed – edit each site.
 * When I goto edit the site under Sites< Edit Site – the http:// is greyed out –
   and only the Domain name after the // can be edited.
 * I have found this article which has the steps of editing the database for a domain
   change. I used this before when having to move a multi-site from a domain to 
   a subdomain, and these directions worked well : [http://wpengine.com/support/how-to-change-a-multi-site-primary-domain/](http://wpengine.com/support/how-to-change-a-multi-site-primary-domain/).
 * I do not know if this would work for SSL however.
 * Is the way to change the domain to be secure, to edit the database and change
   the http to https in the places where it appears in the database?
 * —
 * Another question I have is about the port.
 * I have heard that WP uses port 80, instead of 443, and this needs to be addressed.
 * This old thread from a couple of years ago ([https://wordpress.org/support/topic/ssl-secure-all-multisite-subfolders-subsites?replies=11](https://wordpress.org/support/topic/ssl-secure-all-multisite-subfolders-subsites?replies=11))
   mentions making the core urls have the port information:
 * [http://localhost/](http://localhost/) –> [https://localhost:44301/](https://localhost:44301/)
   
   [http://localhost/es-ES/](http://localhost/es-ES/) –> [https://localhost:443001/es-ES/](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/?output_format=md)
   [http://localhost/fr-FR/](http://localhost/fr-FR/) –> [https://localhost:443001/fr-FR/](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/?output_format=md)
 * I have not made urls with port informationt before…
 * —
 * Anyone have experience on this?
 * Thanks!
 * Kbeebalm

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [vickyj](https://wordpress.org/support/users/vickyj/)
 * (@vickyj)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/#post-6176387)
 * I have the same issue and would like to know how to resolve it also. Anyone know
   how to edit the main site on a multisite to httpS, which does not appear to be
   editable like the sub-directories are editable.
 * Do any of the WordPress developers know how we can update the main siteURL? If
   not, can the developers please create a way of making the main siteURL editable
   so we can upgrade to HTTPS?
 *  [Vfoods](https://wordpress.org/support/users/vfoods/)
 * (@vfoods)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/#post-6176388)
 * I have the same problem!! My site is now down with a redirect error because I
   installed SSL certificate on it.
 * Why is this not covered by WordPress as far as being able to edit the Main domain
   from http to https??
 * Anyone out there that can help?
 *  Thread Starter [kbeebalm](https://wordpress.org/support/users/kbeebalm/)
 * (@kbeebalm)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/#post-6176391)
 * HI,
 * I have figured a lot of this out since no one else posted about this.
 * I had to learn how to edit the database – either in cPanel with the MyPHPAdmin
   area, or with MySQL editor.
 * I am pasting the notes I have been taking for the steps and will share below:
 * STEP 1: Change the values of the url in some key areas.
 * This is from : [http://wpengine.com/support/how-to-change-a-multi-site-primary-domain/](http://wpengine.com/support/how-to-change-a-multi-site-primary-domain/)
 * The directions:
 * If you want to change the primary domain of your WordPress multisite installation,
   there are 5 values to change. There is no need to perform a database dump. This
   is actually frowned upon, as WordPress stores serialized data in the database,
   and altering it can cause corruption. Here is a list of the 3 main tables (for
   https) and options that need to be changed (note that we’re assuming your table
   prefix is “wp_”. If you’re using a different table prefix, replace “wp_” in the
   following table names with your prefix):
 * For changing the url from http to https:
 * • wp_options: options named “siteurl” and “home”
    • wp_sitemeta: the option named“
   siteurl” • wp_#_options: Each sub-site will have sets of tables that correspond
   to the blog_id in the wp_blogs table. You need to go to the wp_#_options table,
   where # corresponds to the blog_id, and update the “siteurl” and “home” settings
   in that table.
 * This resolved most of the issues with changing over the url.
 * 2. FOR SITES WITH LOTS OF PAGES AND POSTS AND IMAGES AND MEDIA – RUN QUERIES 
   ON THE DATABASE TO REPLACE THE URL
 * WordPress uses exact urls for media including images and .pdfs in pages and posts
   of the site. I have updated these by hand, but for some of my sites in my multi-
   site install, some sites had lots of links and images in pages and posts – so
   I edited the database again.
 * After doing research on this here is what I have done to update the media in 
   pages and posts.
 * (from [https://wpbeaches.com/updating-wordpress-mysql-database-after-moving-to-a-new-url/](https://wpbeaches.com/updating-wordpress-mysql-database-after-moving-to-a-new-url/))
 * cPanel – using phpMyAdmin to change urls in multi-sites
 * Depending on how you access the database – here are the notes/directions I took
   for myself.
 * 1. Open PHP MyAdmin
 * 2. Goto each sites’ wp_posts (ex wp_6_posts, wp_4_posts) table
    (Note: the wp_posts,
   and wp_#_posts contains the information of posts and pages)
 * 3. Click on SQL tab.
 * 4. Run this query on each posts (change the wp_posts to each posts table and 
   run for each one:
 * UPDATE wp_posts SET post_content = replace(post_content, ‘[http://www.yoururl.com&#8217](http://www.yoururl.com&#8217);,‘
   [https://www.yoururl.com](https://www.yoururl.com));
 * If you are not using PHPMyAdmin, and are using MySQL Workbench here are the direcitons:
 * MYSQLWorkbench
 * 1. Go to wp_number_posts table. (do this for each one ex wp_2_posts, then do 
   it again for wp_3_posts, etc.)
 * 2. Run: (get ID number ahead of time)
 * UPDATE wp_6_posts SET post_content = REPLACE(post_content, ‘[http://www.yoururl.com&#8217](http://www.yoururl.com&#8217);,‘
   [https://www.yoururl.com&#8217](https://www.yoururl.com&#8217););
 * 3. Click on lightening bolt icon to run query
 * 4. Search and replace is then run.
 * ex: UPDATE wp_50_posts SET post_content = REPLACE(post_content, ‘[https://empire.ncsu.edu/blogs/&#8217](https://empire.ncsu.edu/blogs/&#8217);,‘
   [https://emire.ncsu.edu/blogs/&#8217](https://emire.ncsu.edu/blogs/&#8217););
 * 3. POSSIBLY NEEDED – TO CHECK AND EDIT YOUR THEME FILES..
 * On some sites I updaed, the theme was good to go. On some sites, the theme had
   elements that did not work with SSL, and needed to be updated in the theme files.
 * Directions:
    1. Check your site with whynopadlock your site – which will alert
   you to errors. If the errors are from the theme files, you will have to search
   and fix the elements that you can in the theme.
 * 2. Download theme files, and do a find for each element that generated the error.
   Test Edit the code for each element making the urls https instead of http. Save
   your files that you edited. When done, replace theme files with any ones that
   you edited.
 * I used [https://www.whynopadlock.com/](https://www.whynopadlock.com/) to show
   me any errors, and then if I saw they were from my theme, these were the things
   that I fixed in the theme, and then reuploaded.
 * —
 * So I have done this a few times now, and once I learned how to edit the database
   and run the queries, this was not so bad to do.
 * Also – the [https://whynopadlock.com](https://whynopadlock.com) website is really
   helpful, helping me hunt down the cuprits I need to change!
 *  [vickyj](https://wordpress.org/support/users/vickyj/)
 * (@vickyj)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/#post-6176392)
 * Add this code to the top of the .htaccess file to have http redirect to https
   
   Just change the domain name
 * RewriteEngine On
    RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ [https://yourwebsite.com/$1](https://yourwebsite.com/$1)[
   R,L]

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Steps for Changing WordPress Multisite installation SSL secuire : http
to https’ is closed to new replies.

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 4 replies
 * 3 participants
 * Last reply from: [vickyj](https://wordpress.org/support/users/vickyj/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/steps-for-changing-wordpress-multisite-installation-ssl-secuire-http-to-https/#post-6176392)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
