Uly.me

cloud engineer

  • Home
  • About
  • Archives
Home/WP/Multisite to Single Site

May 10, 2017

Multisite to Single Site

I have a couple of WordPress blogs that are running multisite. I decided I don’t need the other blogs. So, I converted both sites to the standard or single WordPress site. The good news is that there’s no need to reinstall WordPress. It requires just a simple edit of a couple of WordPress files. The conversion was not as bad as I initially thought. Just follow the steps below.

5 Easy Steps

  1. Back up your database — just in case.
  2. Delete the blogs you don’t want.
  3. Edit wp-config.php.
  4. Edit .htaccess.
  5. Clean up your database.

1. Backing up your database — just in case. You can use several tools for backing up your blogs. You can use PHPMyAdmin or a WordPress backup plugin. You can also use the WordPress Export feature to save the blog in XML format in case you want to restore it in the future.

2. Delete the blogs you don’t want – Go to All blogs in the WordPress Dashboard. If you have multiple blogs, it will be listed here. Delete the ones you don’t want.

3. Edit wp-config.php. Remove the Multisite entries in wp-config.php.

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 );

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. Change your .htaccess to the standard WordPress configuration.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

5. Finally, remove the database tables that are no longer needed.

wp_blogs
wp_blog_versions
wp_registration_log
wp_signups
wp_site
wp_sitemeta

wp_blogs wp_blog_versions wp_registration_log wp_signups wp_site wp_sitemeta

Filed Under: WP Tagged With: convert, multisite, single

Have content delivered to your mail. Subscribe below.

About Me

I'm Ulysses, Cloud Engineer at Cardinal Health based in Columbus. This blog is about Linux and Cloud technology. When off the grid, I enjoy riding my electric skateboard. I've surfed, snowboarded and played the saxophone in the past. I hope you find this website helpful. It's powered by WordPress and hosted on AWS LightSail.

  • Cloud
  • Linux
  • Git

Copyright © 2012–2021