Coolest Guides on the Planet

coolest guides on the planet

Coolest Guides On The Planet

  • Home
  • macOS
  • WebDev
  • All Posts
  • Contact

Migrating WordPress MultiSite to a New URL

September 5, 2014 Leave a Comment

multisiteMigrating WordPress MultiSite to a New URL can be done with a combo of 2 excellent free plugins; WP Migrate DB and BackWPup  the former deals with the database and the latter deals with the files.

The key thing when updating the WordPress database to reflect a new hosting URL is making sure any data serialization stays intact, data serialization involves using the URL in data and if the URL is changed it breaks the data and doesn’t display it. Certain tools like WP Migrate DB take this into account when changing the URL whereas a blanket find and replace in a text editor or a database dump may put you in deep water.

This guide is based on a subfolder WordPress multisite installation,

Installation

Install both plugins in the originating URL and Network Activate them.

Migrating the Database with the New URL

Launch WP Migrate DB via the main admin Dashboard Settings > Migrate DB

wordpress-mutisite-migration

Add in your target URL and home directory webroot path. Take note not to include the webserving protocol in the URL – start with // and also don’t leave trailing slashes in either path.

The advanced options are not required but can be efficient in certain circumstances.

Click on Migrate DB and when done it will pop a gzipped archive in your download folder.

Migrating the Data

wordpress-mutisite-file-migration

Launch BackWPup via main network admin Dashboard and create a new job, just need the files, no need for the database. Save and run now, this plugin has a host of destination options, you can just do it to a local folder and then download when complete.

wordpress-mutisite-file-migration-download

Upload to new URL Destination

Upload both archives to the home directory of the new destination. Uncompress the archives:

Extract the data

tar -xvf files-archive.tar.gz

Remove any database it may have brought with it

rm *.sql

Change files ownership to correct user

chown -R realowner:realowner *

Extract the database

gunzip databasename.sql.gz

Assuming you have a new empty database setup, import the old database

mysql new_databasename < imported_database.sql

The above steps are all command line driven as root, if you don’t have shell access, this will have to be done with phpmyadmin and a ftp app.

 Fix .htaccess and wp-config

Fix up references to the URL in both .htaccess and wp-config

Add in new database connection in wp-config

.htaccess for modern WordPress should resemble

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
RewriteRule . index.php [L]

 wp-config should include

/* Multisite */
define( 'WP_ALLOW_MULTISITE', false );
define('MULTISITE', true);
define('SUBDOMAIN_INSTALL', false);
define('DOMAIN_CURRENT_SITE', 'mynewdomain.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
/* That's all, stop editing! Happy bloggin

Make sure and define ‘DOMAIN_CURRENT_SITE’ with the new URL.

That’s it.

Cats: WebRoot, WordPress

Tags

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls

Donate a Beer to the Coolest Guides

Get Beaver Builder Now!

Discuss

3gs 10.6 apache backup baseband boot clean urls cpanel css curl custom database drupal el capitan git Google image instadmg ios iphone jailbreak keys lion mac macos mojave macos sierra menu mysql OSX panda php phpmyadmin private public redirect redsn0w remote rsa SEO shell ssh terminal unstoppables upgrade urls
Get DesktopServer

Lynda

Lynda.com Online Training Videos

TreeHouse

smlinks

Learn WordPress
osx-modify-shell-path

How to Add to the Shell Path in macOS Big Sur and Catalina using Terminal

October 19, 2019

virtual-hosts osx 10.10 yosemite

Set up Virtual Hosts on macOS Catalina 10.15 in Apache

October 19, 2019

Installing Homebrew on macOS Catalina 10.15, Package Manager for Linux Apps

October 18, 2019

Where is the bash shell in macos Catalina?

October 12, 2019

Refine your search

  • All
  • Modules
  • Themes
  • Documentation
  • Forums & Issues
  • Groups

RSS ars technica

  • Google hits back after Apple exec says AI is hurting search
  • Apple: “Hundreds of millions to billions” lost without App Store commissions
  • Matter update may finally take the tedium out of setting up your smart home
  • Cue: Apple will add AI search in mobile Safari, challenging Google
  • Apps like Kindle are already taking advantage of court-mandated iOS App Store changes

RSS mac surfer

  • Tot is new text editor for Mac, iPhone, and iPad focused on constraints and ease of use
  • TiPbITS: Google Drive Sorting Can Hide New Documents
  • How to take a screenshot on a MacBook Pro
  • How To Create Simple Animation With Mac Keynote
  • Last Week on My Mac: Virus pandemics

Donate

Copyright © 2025· Neil Gee - All Rights Reserved - Hosted by Runcloud

Copyright © 2025 · gee on Genesis Framework · WordPress · Log in