After removing a WordPress domain, WordPress Toolkit starts to show error: Can not find domain by id

Follow

Comments

5 comments

  • Avatar
    Tara

    Just in case this helps anyone: I had this error and "select instanceId from InstancesDomains where domainId=123;" wasn't returning anything.  I searched in the Instances table instead: "select * from Instances where domainID=123;" and was able to get the InstanceId that way.

    In my case the InstanceId was actually associated with a different domainId in InstancesDomains:

    select * from InstancesDomains where instanceId=789;
    instanceId|domainId
    789|124

    After double checking that the domain in question (can be gotten from "select * from Instances where domainID=123;" )was indeed removed from Plesk, I ran the delete commands on instanceId 789 and that solved my problem.

    0
    Comment actions Permalink
  • Avatar
    Alisa Kasyanova

    @Tara
    Thank you very much for your comment. I am sure that it would be helpful for other Plesk users!

    0
    Comment actions Permalink
  • Avatar
    Ehud Ziegelman

    See the steps on Resoultion for Plesk Onyx. They describe the solution better than the article itself, and of not clicked, can not be seen:


    Resolution

     

    For Plesk Onyx on Linux
    1. Connect to the Plesk server via SSH.

    2. For security purposes, create a dump of the Plesk database:

      # plesk db dump psa > psa.sql

    3. Remove leftovers from the Plesk database:

      # plesk db "truncate longtasks"
      # plesk db "truncate longtaskparams"

    4. For security reasons, create a backup of the WordPress Toolkit database:

      # cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}

    5. Access the WordPress Toolkit database in SQLite:

      # sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3

    6. Enable headers:

      sqlite> .headers on

    7. Get a WordPress instance ID using the domain ID from the error message. In this example, domainId is 123.

      sqlite> select instanceId from InstancesDomains where domainId=123;
      instanceId
      567

    8. Remove all corresponding information:

      sqlite> DELETE FROM InstanceProperties WHERE instanceId=567;
      sqlite> DELETE FROM InstancesDomains WHERE instanceId=567;
      sqlite> DELETE FROM Instances where id=567;

    9. Exit SQLite:

      sqlite> .quit

     

    0
    Comment actions Permalink
  • Avatar
    Ehud Ziegelman
    1. Connect to the Plesk server via SSH.

    2. For security purposes, create a dump of the Plesk database:

      # plesk db dump psa > psa.sql

    3. Remove leftovers from the Plesk database:

      # plesk db "truncate longtasks"
      # plesk db "truncate longtaskparams"

    4. For security reasons, create a backup of the WordPress Toolkit database:

      # cp -p /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3{,.backup}

    5. Access the WordPress Toolkit database in SQLite:

      # sqlite3 /usr/local/psa/var/modules/wp-toolkit/wp-toolkit.sqlite3

    6. Enable headers:

      sqlite> .headers on

    7. Get a WordPress instance ID using the domain ID from the error message. In this example, domainId is 123.

      sqlite> select instanceId from InstancesDomains where domainId=123;
      instanceId
      567

    8. Remove all corresponding information:

      sqlite> DELETE FROM InstanceProperties WHERE instanceId=567;
      sqlite> DELETE FROM InstancesDomains WHERE instanceId=567;
      sqlite> DELETE FROM Instances where id=567;

    9. Exit SQLite:

      sqlite> .quit

    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Ehud,

    Thank you for the feedback maybe your notes will be helpful for other Pleskians!

    Some information in hidden in spoilers to make an article more compact and to make navigation between solutions for Linux and Windows easier.

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request