Manually detach WordPress instances from Plesk WordPress Toolkit

Let’s say you manually deleted a WordPress directory that was being managed by the Plesk WordPress Toolkit. Now the directory is gone but it still shows up in the WordPress Toolkit with an error, OR it doesn’t show up in WordPress Toolkit but you still get daily emails about the non-existent WordPress installation. These instructions will help you manually remove the instance from the WordPress Toolkit.

These steps are for Plesk Obsidian 18 but may work for other versions. First, you need to get the domain ID from MySQL:

# mysql -D psa

> select id from domains where name = '';

| id |
| 88 |
1 row in set (0.00 sec)

Then you need to find the WordPress instance ID using sqlite:

# sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3
sqlite> .mode columns
sqlite> .headers on
sqlite> select * from instances where domainId = 88;
id          domainId    path                  isIgnored   apsInstanceId  serverId
----------  ----------  --------------------  ----------  -------------  ----------
18          88          /httpdocs             0
19          88          /httpdocs.old/blog    0

Here you can see there are two instances for the same domain, however, one is old and needs to be removed.

Finally, you can detach the non-existent instance using the Plesk command line utility:

# plesk ext wp-toolkit --detach -instance-id 19

Add a Comment

Your email address will not be published. Required fields are marked *