How To Disable And Uninstall A WordPress MultiSite
- Insights

How to Disable and Uninstall a WordPress MultiSite

While it is relatively easy to set-up and install a WordPress Multisite, it can actually be a challenge to disable and uninstall a WordPress Multisite. To disable and uninstall a WordPress Multisite is to undo all the work you did to install it. That is all, lets go into the nitty-gritty of how you can disable and uninstall a WordPress Multisite.

I initially set up ademike.com to be a multisite, the main site to be the blogging platform which you are now viewing and the other sites to show up my portfolio, website samples I have designed. I then decided it wasn’t serving any purpose anymore so the reason to delete and deactivate the other non-functional sites.

Same as your, right? Below you will find a straightforward guide on how to disable and uninstall a WordPress Multisite and get you site running on a single installation.

 

STEPS TO DISABLE AND UNINSTALL A WORDPRESS MULTISITE

 

STEP ONE:

DO A COMPLETE BACK UP

This should be done in order to be safe than sorry. Do a complete back-up of your website files and database. In any case you miss anything or your site gets broken in the process, you have something to fall back to. I will suggest Updraftplus which should be enough to get the job done.

If you want to backup and download the different site separately, so you can reinstall them on separate WordPress installations, you can use BackupBuddy.

 

STEP TWO:

DELETE UNWANTED SITES

Get rid of all the sites in the network leaving only the main site. You can do this by deleting the site.

 

STEP THREE:

DISABLE NETWORK ACTIVATED PLUGINS AND THEMES

Since there will be no network, it does make sense to disable network activated themes and plugins

 

STEP FOUR:

EDIT WP-CONFIG FILE TO REMOVE MULTISITE MARKERS

Next, you will need to remove all multisite marker that was placed in the wp-config file. Simply navigate to Network Admin > Setting > Network Setup and you should see something like this

disable and uninstall a WordPress Multisite

 

define('MULTISITE', true);
define('WP_ALLOW_MULTISITE', true );
define('SUBDOMAIN_INSTALL', true);
define('DOMAIN_CURRENT_SITE', 'yoursite.com');
define('PATH_CURRENT_SITE', '/');
define('SITE_ID_CURRENT_SITE', 1);
define('BLOG_ID_CURRENT_SITE', 1);
define('SUNRISE', 'on' );

 

Now Login to your website hosting account control panel (cpanel), navigate to File Manager to access the site files. Open the wp-config.php file, find and delete the above code from the file and save.

You will also need to edit the following line in your wp-config.php file and set it to “false”. This line is just above the codes you deleted.

define( 'WP_ALLOW_MULTISITE', true );

 

NOTE:

  • If you complete the process above, the multisite dashboard should have been removed, remaining the main site dashboard.
  • If you complete the above process successfully, you should be logged out of your site.

 

STEP FIVE:

DELETE OR GENERATE NEW .HTACCESS FILE

Next in the File Manager of your hosting account look for the file named .htaccess and delete it.

You will then log in. Just visit http://yoursite.com/wp-admin/ and login normally with the admin user you’ve always used.

After login in to your Dashboard, navigate to Setting > Permalinks and save this setting. This will generate a new .htaccess file for you automatically and fix some issues as well.

OR

Another way to do this is to edit your .htaccess file, which is in the root of your WordPress installation in the File Manager.

Replace the rules above in the picture (which was used to create the multisite install) with the following new rules:

 

# 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

STEP SIX:

DROP MULTISITE TABLES FROM THE DATABASE

The next thing you will need to do now is to drop the multisite table from your database. This will remove the tables created for the rest of the sites that you have deleted, leaving only the tables for the main site.

To drop the tables, in your cpanel click on phpMyAdmin to access your database. Next click on the check boxes beside the following table

  • wp_blogs
  • wp_blog_versions
  • wp_registration_log
  • wp_signups
  • wp_site
  • wp_sitemeta

In addition, click on the check boxes beside any table that start with “yourprefix_#_” such as “wp_3_comments” or “yourprefix_3_comments”. These tables are for the sub-sites you have deleted.

Then select the “With selected:” drop-down menu at the bottom and click “Drop”. You will then confirm the ‘drop’ command in the next step.

There can be other tables you might need to drop and delete from the database as well if you have installed plugins that works with multisite but are not needed in the main site.

You can also repair and optimise the database at this point. Use the “Check All” checkbox before the same “With selected:” drop-down, then click “Repair”. After that’s completed. Click the “Structure” tab at the top of the database table to get back to the top level of the database, and repeat the process, only this time select “Optimize.

 

STEP SIX:

DELETE THE “SITES” FOLDERS IN FILE MANAGER

The “sites” folder contains all the files uploaded to the sub-sites and needs to be deleted since they are not needed. Back in the File Manager, navigate to /public_html/wp-content/ or /public_html/wp-content/uploads. There you can delete the “sites” folder

.

STEP SEVEN:

RE-ACTIVATE PLUGINS

Now activate all the plugins that are supposed to be running and check the front-end of your website to make sure everything’s working fine.

You might have to set up some plugins that requires additional settings

 

That is all you have to do to disable and uninstall a WordPress Multisite. At this point everything should work great as it did for me.

 

The process to disable and uninstall a WordPress Multisite can be a hassle and time consuming. Just like you are thinking, I also wish there can be a simpler method to follow or at least a plugin (free, premium or freemium) that can replicate the process to disable and uninstall a WordPress Multisite at the click of a button.

 

If you have any issue or something goes wrong, please comment below.

 

If you need help or does not want to go through this process, you can contact me directly to do it for you.

Leave a Reply