Wordpress to Wordpress multisite

This assumes that you have a new wordpress installed with multisite enabled and that you want to move an existing site into it. It also assumes that you have WordPress MU Domain Mapping plugin installed

Database

  • export current database as sql and edit sql file
  • replace `wp_ with `wp_nnn_ where nnn is the blog id
  • in wp_options change field name wp_user_roles to wp_nnn_user_roles
  • Note that wp_user will be ignored 
  • Rename links
    • wp-content/uploads/xxx to files/xxx
    • wp-content/gallery to wp-content/blogs.dir/nnn/gallery
  • import the file in the new database

Files

  • Transfer content of uploads to blogs.dir/nnn/files
  • (Nextgen) Transfer content of gallery to blogs.dir/gallery

Settings update

  • (Nextgen) option: update default folder (wp-content/gallery) to wp-content/blogs.dir/nnn/gallery/ (to do this in wp_nnn_options, field ngg_options

Post update

After importing the new database, you might to change some links after changing the domain name:


UPDATE wp_nnn_posts SET POST_CONTENT = replace(POST_CONTENT, 'myolddomain.com', 'localhost/sandbox');

Popular posts from this blog

Soving AccessDenied on Google Cloud Storage domain mapping

Fixing "DerInputStream.getLength(): lengthTag=109, too big" in Android Studio

USB Foot Switch II - "Usb HIDKB Not connected"