Remove WordPress Multisite Feature – ToDo List!

You can activate the Multisite functionality of WordPress relatively quick and it is well explaind in the backend how to do it. But not always you like to keep it as a multi site installation and therefore you have to do some measures to remove the Network function again.

Not easy and probably not an every day task – so that’s why I created a small todo list in order not to forget a step to restore to the default installation.

  1. Save all your data – Database and files via FTP
  2. Set the constant WP_ALLOW_MULTISITE to FALSE or delete the definition
  3. Remove the following line in your wp-config.php; Just comment out is enough.
    /**
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/wordpress/';
    define( 'DOMAIN_CURRENT_SITE', 'localhost' );
    define( 'PATH_CURRENT_SITE', '/wordpress/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );
    */
    
  4. Remove the entries for the network in your .htaccess which is in the root of your installation
    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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]
    # END WordPress
    
  5. Now recreate the permalinks and add the necessary lines to .htaccess (wp-admin/options-permalink.php)
  6. Remove the fields spam and deleted in the user-table (adjust prefix)
    ALTER TABLE `wp_users` DROP `spam`, DROP `deleted`;
    
  7. You can delete the following tables in your database (adjust prefix)
    • wp_blogs
    • wp_blog_versions
    • wp_registration_log
    • wp_signups
    • wp_site
    • wp_sitemeta
    • wp_sitecategories (if global terms were active)
      DROP TABLE 
          `wp_blogs`, 
          `wp_blog_versions`, 
          `wp_registration_log`, 
          `wp_signups`, 
          `wp_site`, 
          `wp_sitemeta`, 
          `wp_sitecategories`;
      
  8. Now you have your default installation of your default blog back. But in your database there are still tables of the 2nd created blog. You have to check if you need some information of this former blog. If not, you can also delete the tables of the former 2nd blog.

Just remember: Before proceeding I really recommend to create a backup.

Here’s an interesting post by Pantheon that can help you understand whether Multisite is suitable for your specific scenario and website.


Posted

in

by

Comments

4 responses to “Remove WordPress Multisite Feature – ToDo List!”

  1. ozh Avatar

    Nice todo list. Indeed, the conversion from MS to plain single is something possible, thanks for reminding this 🙂

  2. Andrea_R Avatar

    the only thing I woudl do different is shuffle the “check other blog’s posts” closer to the top. 😉

    Backup, save content from sub blogs if you want it, then proceed.

  3. Frank Bültge Avatar

    Thanks for your replies and also many thanks for read our blog! But i think, the normaly workflow for replace blogs is different complex and i hope, this makes users with a little bid of experience 😉

  4. […] multisites de WordPress 3.0 mais que vous voulez revenir à la version simple utilisateur, voici un tutoriel de WPengineer qui vous explique la marche à […]