MainWP: This site already contains a link

If you use MainWP, you may have been reconfigured on a site at some point after a migration, URL change, or similar.

In these cases it is very likely that you will receive an error like the following when reconnecting:

Error detectado: Este sitio ya contiene un enlace. Por favor, desactiva el plugin MainWP y vuelve a activarlo.
Sugerencia: ve al sitio hijo, desactiva y reactiva el plugin MainWP Child y vuelve a intentarlo.

Although the system recommends that you disable or uninstall the plugin, the data is still saved in the database so you may not be able to reconnect it. This lack of cleanliness of the contents in the database should be an element that integrates the plugin when uninstalling it, but by not doing so, we only have one option: to eliminate the junk data ourselves.

To start we will disable the MainWP Child plugin. It is not necessary to uninstall it, but it is necessary to deactivate it. When reactivated, everything we are going to eliminate will be regenerated.

To do this we access the database of our WordPress, for example with a phpMyAdmin, and execute the following query:

DELETE FROM wp_options WHERE option_name LIKE 'mainwp_%';

Remember that you must review the prefix of the tables and replace wp_ in case we get the one that is by default. With this we will delete all the previous data of the plugin.

Remember that, if you have a database cache activated (memcached or Redis type) you must empty it, since this data is stored there temporarily.

Now we will reactivate the MainWP Child plugin and we can start the process again, generating the unique identifier again, and adding the site again in the main MainWP panel.

The site will be recreated without problem and we can enjoy again the tool that notifies us of the pending updates.

About this document

This document is regulated by the EUPL v1.2 license, published in WP SysAdmin and created by Javier Casares. Please, if you use this content in your website, your presentation or any material you distribute, remember to mention this site or its author, and having to put the material you create under EUPL license.