WordPress multi-site comes in handy when you want to start more that one blog or website on a single WordPress-installation, but some users with a multi-site network might want to switch to single-site one.
So, in this guide, I’ll show you how to revert your website back to Single-WordPress Installation.
Note: It is always safer to take a Backup of your stuff before performing any significant change that you have no idea about, since, reverting to a single-user site will delete all the websites except the main site. If you are looking for a plugin to BackUp your data then consider checking this. ValutPress
Table of Contents
How to Uninstall WordPress multi-site?
Setting up the WordPress Multi-site may not be difficult but reverting the process is relatively a hard work to do. As I’ve already mentioned above, take a proper backup of your site before performing the task.
Now, let’s move to our first step.
Edit your wp-config file :
So, to do this you have two ways, either, using the FTP or by using the cPanel, in case, if you decide to use cPanel: go to your File Manager. Next, inside the public_html folder search for the file named wp-config.php (right click on it and then click edit )
Or, if you plan to use the FTP. Using any FTP software you like, connect to your website’s home directory then inside the public_html folder we need to edit the wp-config.php file.
After the editor opens up, we have to delete these lines from the wp-config.php :
define( 'MULTISITE', true );
define( ‘SUBDOMAIN_INSTALL’, false );
$base = ‘/’;
define( ‘DOMAIN_CURRENT_SITE’, ‘www.haxworld.net’ );
define( ‘PATH_CURRENT_SITE’, ‘/’ );
define( ‘SITE_ID_CURRENT_SITE’, 1 );
define( ‘BLOG_ID_CURRENT_SITE’, 1 );
Note: In the wp-config file, your website’s name will appear instead of ‘www.haxworld.net’ and the location of your WordPress installation will appear instead of ‘/’ (by default, it’s installed in the home directory).
Furthermore, you’ll have to edit the line, same as the one given below, and change it to “false” from “true”.
define('WP_ALLOW_MULTISITE', false);
Edit your .htaccess :
Finally, the WordPress multi-site has been uninstalled but you still need to edit a few lines in the .htaccess to access your website smoothly.
Note: In case, if you are unable to see the .htaccess file in your WordPress installation directory then make sure you check the Show Hidden Files option from the top-right corner.
If you had installed the WordPress multi-site by adding the rules manually then replace those rules with the code given below. Or, if you had installed the multi-site automatically, at the time of installation of WordPress, then Replace the lines which come between [#Begin WordPress and #End WordPress] by the code given below.
# BEGIN WordPress RewriteEngine On RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] # END WordPress
Dropping Tables from the Database :
Finally, just one more step is left that’s to clean your database of those waste multi-site tables.
To access your database there’s no way as simple and easy as phpMyAdmin. To access phpMyAdmin, go to your cPanel. You’ll find the phpMyAdmin option, under the databases tab.
After you open phpMyAdmin, choose your database then search for the tables given below, select them, then choose drop option to delete those tables.
- wp_blogs
- wp_blog_versions
- wp_registration_log
- wp_signups
- wp_site
- wp_sitemeta
Note: Table prefix may be different in your case.
So, we’re done. When you log in to your admin dashboard next time you’ll not see the multi-site anymore. 🙂
If you still face any problems while or after uninstalling the WordPress multi-site, please let me know in the comment section below.