How to fix Warning: An existing WordPress network was detected
While converting a WordPress single install to multisite, the following error notice was displayed at the Network Setup admin page.
Warning: An existing WordPress network was detected
the instruction in Network Setup page clearly stated that the PHP constant definition below should be placed before
/* That’s all, stop editing! Happy blogging. */
in wp-config.php file and I was placing the code the end of wp-config.php
.
define('MULTISITE', true); define('SUBDOMAIN_INSTALL', false); define('DOMAIN_CURRENT_SITE', 'mysite.it'); define('PATH_CURRENT_SITE', '/'); define('SITE_ID_CURRENT_SITE', 1); define('BLOG_ID_CURRENT_SITE', 1);
Solution
Adding the PHP constant definition above
/* That’s all, stop editing! Happy blogging. */
fixed the problem.
If the solution do not work for you, performing the ritual below certainly will.
- Reset your wp-config.php file back to its original state, remove any MULTISITE references.
- Delete the .htaccess file or move it temporarily.
- Drop the following tables from your WordPress Database, use a tool like phpMyAdmin if you are not comfortable directly modifying table data.
wp_blogs wp_blog_versions wp_registration_log wp_site wp_sitemeta wp_signups wp_sitecategories
- Log out and Log back into your site and initiate the Network Setup.
- Recreate the .htaccess file with the copy pasted data.
- Modify the
wp-config.php
file, remember to paste those lines above the line where it says/* That's all, stop editing! Happy blogging. */
Source: Stack Overflow.