How to upload a WP Multisite from local to web server

Hello wpmudev-team,

I want to upload my multisite with subsites to my web server. The site is currently on my MAMP localhost.
Do you have a link to an tutorial? I asked my web host, they don't give Multisite live or email support?

I saw for single WP installations there is the Duplicator Plugin, but how about Multisites? That's a different story, right?

Thank you, Michael

  • Mindblaze
    • The Incredible Code Injector

    Hi mikkolaus,

    What i generally do is :

    1. Zip the entire source
    2. Upload on my server
    3. Extract it there
    4. Make sure the .htaccess file is copied too (sometimes its missed)
    5. Edit the settings in the wp-config.php to match the DB
    6. Double check the defined 'DOMAIN_CURRENT_SITE' to match the new domain
    7. Use the rrreplacedb.php for to replace the old domain name with newer one.

    The rrreplacedb file can be found here http://interconnectit.com/products/search-and-replace-for-wordpress-databases/

    I hope this helps. However i must mention, its possible that some configurations for plugins/themes need modifications too as the server environment can be different.
    Also depends if anything is hardcoded (especially the URLS)

  • Paul Barthmaier
    • Code Wrangler

    Hi there and welcome to the WPMU DEV Community for WordPress Support!

    And what a welcome, you got, @mikkolaus! One of the things that I love to see most, member helping member! Thanks to you, too, @Mindblazetech. Rep Points on their way to you!.

    I do think that this is the best way to go, I also think the Duplicator plugin can work, too. I don't think they guarantee anything, but I think it does, and you'll still need to do the search and replace for your URLs. That is, not all of them for Multisite are changed automatically by the plugin.

    Cheers,
    Paul

    "Try it, you'll like it!"

    ~Advice from an Alka Seltzer ad.

  • mikkolaus
    • Flash Drive

    Thanks Paul!
    I followed Mindblazetech's instruction and were able to get the http://www.websitename.com (initial page) going, but when I clicked anywhere in the menu the links were all broken. Also, I couldn't log in http://www.websitename.com/wp-admin. This page was broken as well.

    When I chose the wp_tables, I selected all. I wonder if you can tell me which ones I shouldn't select, since I assume that I made somewhere a change that I better should not have done.

    Using the replace_db.php script, I replaced in all wp_tables the word localhost by http://www.websitename.com. After doing that, I could successfully load http://www.websitename.com, but I could not load other subpages.

    Since the entry in the table wp_blogs the Domain is:
    localhost

    and the Paths is:
    /websitename.com/

    and for chilpages
    /websitename.com/eng
    /websitename.com/br
    /websitename.com/de
    ...

    , I changed the path by replacing
    /websitename.com/

    simply to

    /

    After doing that, the domain and the path seemed to be correct in the wp_blogs table. But when I loaded http://www.websitename.com, it refered to the wrong old URL localhost/websitename.com.

    Is there any table where localhost as entry must remain?

    Sorry for writing this thesis.
    Someone told me that instead of zipping my websitename.com on my local server and uploading it to the web server, I should rather do a new wp-installation on my web server (bluehost, via simplescripts).
    But than I have to turn this installation manually into a wordpress multisite and still have to change the local server URL to the online web site URL.

    One more thing I want to add. I didn't saw a .htaccess file when I uploaded the zipped folder of my local server site. The .htaccess file is not visible/accessible on bluehost told me the bluehost support. I wonder if this is correct and if this may have caused the problem?

    Thanks,
    mikkolaus

  • mikkolaus
    • Flash Drive

    If, instead, you are changing domains, then the best way to move Multisite is to move the files, edit the .htaccess and wp-config.php (if the folder name containing Multisite changed), and then manually edit the database. Search for all instances of your domain name, and change them as needed. This step cannot yet be easily automated. It's safe to search/replace any of the wp_x_posts tables, however do not attempt blanket search/replace without the Search and Replace for WordPress Databases script.

    All below listed entries are correct on my server, but still... links are broken...

    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite
    ...
    If you're moving Multisite from one folder to another, you will need to make sure you edit the wp_blogs entries to change the folder name correctly. You should manually review both wp_site and wp_blogs regardless, to ensure all sites were changed correctly.

    Also manually review all the wp_x_options tables and look for 'three fields and edit as needed:

    home
    siteurl
    fileupload_url

  • Imperative Ideas
    • HummingBird

    Let me run something different by you, Mikkolaus. Personally, I use Git with Jetbrains PHP Storm but that's just my process. Here are two articles. Grab yourself a coffee, a beer, a wine, or a snack and settle in.

    Version 1: Using Mercurial to sync Localhost with your live server:
    http://wp.tutsplus.com/tutorials/how-to-sync-a-local-remote-wordpress-blog-using-version-control/

    Version 2: Doing the same thing with Git and Dropbox
    http://wp.tutsplus.com/tutorials/hosting/wordpress-development-and-deployment-with-mamp-git-and-dropbox/

    If you take the time and learn how version control + sync works, it will literally automate this process so you can spend your time writing code instead of doing endless migrations.

    Read the articles in order because I think the first one actually gives a better primer on what you are about to do. I include the second one because it uses more popular tools.

    This will have to be your project for at least a couple of hours but once you get it working, you won't look back. Ever.

  • Imperative Ideas
    • HummingBird

    A quick aside - database sync is a bitch. You may not even want to go there.

    The cheat code is to work from a hosts file so that the live server redirects to localhost. When you need access to the live version, comment out the hosts level redirect on your machine.

    Now you can just export your .sql file back and forth like a boss.

  • mikkolaus
    • Flash Drive

    Thanks Imperative Ideas,

    I am checking out the links you send.
    I agree with your comment. Once I understand, I choose what works best for me.
    For now... anything that works, makes my day... whether complicated or easy. :slight_smile:

  • geauxvols
    • New Recruit

    I'd like to chime in on this topic. I've been maintaining and developing WP sites for awhile, mostly on an intermediate skill level. However, deployment has always been a pain. As such, I've until now done development in production (which as a developer in other areas really freaks me out, but I digress). I've tried deploying through FTP, and maintaining source control with Git, but I don't like the methodology thus far. I really wish a tool existed that worked like Subversion, or TFS, where I could just check code in and out from dev to QA to prod. Maybe someone out there has a setup that does this, but so far, I haven't seen it. This thread has been a treasure trove of ideas though, and I thank you guys for that.

    - David

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.