Support » Networking WordPress » local server to live server steps needed to be taken

  • Resolved adjohan

    (@adjohan)


    We are hosting our WP installation internally and will plan to go live this Saturday. It is a multisite subdirectories settings. Our current website is under http:// and not https:// but the new WP will be a secure server hosting.

    I have a few questions:

    1. Right now the link is ww2 and of course will be swapped over to www. Do I just need to change ww2 reference on wp-config or do I also need to do it on the wp_options table? This is the code we have referencing ww2 on the wp-config:
    define( ‘DOMAIN_CURRENT_SITE’, ‘ww2.websitenamehere.com’ );

    We tried to test out changing the ww2 to http://www.websitenamehere.com as a test but when we changed that I can’t access the My Sites > Network Admin dashboard anymore.

    2. On the dashboard My Sites > Network Admin > Sites. The base domain Siteurl and Home are grayed out so I can’t make any changes to it, but for the subsites I can easily changed the Site Address (URL) ww2 reference to the correct http://www.websitenamehere.com/sub1. Is there a reason why I can’t change the base url through the dashboard?

    3. I’ve downloaded Better Search Replace plugins because it seems like on the day we make the website live, I’d need to use that plugins to search for reference of ww2 onto the wp_options, wp_site, wp_sitemeta, wp_blogs, and wp_#_options, where # is the site id for all the subsites I’ve created. Is this correct?

    Let me know if there are any steps we’d need to take in order to have a successful launch this weekend.

    [Moderator note: Please, No bumping].

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    See Moving WordPress for detailed instructions. You are moving between servers and changing domain names, even if it’s just the ww2 part.

    Options table changes, including base URL, can be achieved through the semi-secret all-options admin screen. Type in yourdomain/wp-admin/options.php URL in your browser. Options are alphabetical, look for “home” and “siteurl”. Not sure why multisite prevents normal UI access to the base URL, but it does.

    Sub-site data is saved in the wp_blog and wp_site tables. It doesn’t really matter too much which tables, you can search the entire DB for the domain names you need to alter. Of course it’s more efficient to search just the specific tables, but searches are relatively fast IME. I always search the entire DB because URLs can lurk in strange places.

    Thread Starter adjohan

    (@adjohan)

    It was pretty bad first hour or so trying to get the website live and working correctly. We changed the reference of ww2 to www on wp-config.php file first which is NOT the correct way to do it.

    Next step we tried to change the WP database using Better Search Replace plugins, but kept getting error of memory is not enough to handle the changes. In the end I ask our IT department to use WP-CLI command line to make all those changes from ww2 to www and it worked perfectly, but somehow there were still a few ones that it didn’t catch so I ended up using the Better Search Replace plugins for that.

    Overall this is a good learning experience for us since now we know the proper way of activating a multisite correctly from test server to live server.

    Moderator bcworkz

    (@bcworkz)

    Glad to hear it’s been resolved. WP_CLI was an inspired workaround to a low memory issue! For the sake of anyone who might land here via search, the interconnect/it search and replace tool might also demand less memory resource because it works outside of the WP environment. The Better Search and Replace plugin uses this tool internally as its search engine, but as a plugin it must work within the WP environment, which can take up a good chunk of memory for itself.

    What a great post! Thank you so much. I am looking forward to reading more valuable posts from you. Typeracer

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.