• Okay so here’s my conundrum.

    I have an OLD multi-site install. I’ve already created a new one and moved most of the content over to the new site. Of course using free tools and such there’s no simple way of moving all the attachments for the posts to the new server so many of the posts on the new sites, link to attached files in their respective “copies” on the old server.

    The new multi-site has a new URL (subdomain) and each site from the old server has it’s own new location as well.

    But posts still hard link to attachments sitting in the media libraries of their respective old sites.

    So, our setup is like this.

    Old site
    https://oldsite.ourdomain.edu/group-1
    is now at
    https://newsite.ourdomain.edu/group-1

    But there’s several references in the posts to files that are still on that old server. like the following…
    https://oldsite.ourdomain.edu/group-1/wp-content/uploads/sites/42/2014/01/oldattachment.doc
    is sitting in
    /var/www/html/wp-content/uploads/sites/42/2014/01/oldattachment.doc

    These files go back several years, I don’t want to move them over by hand. But that server has to be powered down.
    I just want to copy the entire wp-content/uploads folder over

    My plan was to point the subdomain oldsite to the same server that newsite’s is on, copy the entire /var/www/html/wp-content/uploads folder to the new server, set up a new vhost for it that responds to the old subdomain and let the URL continue to work like normal, but without having to install WordPress at that location.

    How would I go about doing that? Is it a lost cause? I know that WordPress handles a lot of that routing, is there a way to emulate it via htaccess perhaps?

Viewing 1 replies (of 1 total)
  • Moderator Dion Hulse

    (@dd32)

    Meta Developer

    How did you migrate the posts over? You might just be able to copy the files and then do a search/replace in the database for the URL’s, but that would be questionable some some serialized data.

    The simplest way IMHO would be to do an export of each site on the old server, and then import those into the new server, allowing it to download the media from the old server as part of the import process.

    There’s a wp import CLI command, but for a multisite that would require some scripting, there’s also 10up’s MU migration CLI commands that would probably work better as it creates a single ZIP of the network (with plugins, themes, attachments, posts, users, etc) that can then be imported to a new network with optionally a different URL.

Viewing 1 replies (of 1 total)
  • The topic ‘Moving ONLY the routing/uploaded content to new server’ is closed to new replies.