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/
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/)
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’, ‘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’, ‘https://www.yoururl.com’);
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/’, ‘https://emire.ncsu.edu/blogs/’);
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/ 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 website is really helpful, helping me hunt down the cuprits I need to change!