• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved WP-Toolkit question Failed to reset cache for the instance #2

KlausZ

Basic Pleskian
Hello,
i got this message via mail:
Failed to reset cache for the instance #2: Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.

When i do a plesk ext wp-toolkit --list i saw two instances:

ID Main Domain ID Installation Path Owner ID State Hidden Website URL Name Version
2 1 1 Broken false https://www.beispiel.de/var/www/vhosts/www.beispiel.de
3 1 /httpdocs 1 Working false Beispiel Domain Beispiel User 5.9.2

In Plesk i see only the working instance "3", but not the false instance "2".
How can i delete this instance? In Plesk or shell?

Thanks for help.

Klaus
 
The instance with ID 2 has weird URL - some mix of the domain name and the path on file system. I wondering were it was originated from?

Anyway, you can detach it from the toolkit using CLI call like this:

plesk ext wp-toolkit --detach -instance-id 2

This command will remove the record about this website from the toolkit, but website files and the database will not be physically removed.
 
Hi, I have the same problem with different sites on u server. Is there a solution to fix them all at once?
Thanks
 

Attachments

  • Immagine 2022-06-16 080347.png
    Immagine 2022-06-16 080347.png
    158 KB · Views: 19
@CercamiFacile cli command is able to detach only one installation per call. If these installations are shown in UI, you can use a filter (located on the top right) then use bulk detach.
 
Do you want to fix "broken" state of installations, detach all of them, or something else?

Each installation can have its own issue that makes it "broken" and should be fixed individually. "broken" means something went wrong when WPTK interact with the installation via wp-cli. After fixing the error, the installation will automatically become "alive" after the next cache invalidation.
 

Attachments

  • broken installation description.png
    broken installation description.png
    67.3 KB · Views: 11
I have the problem that tells me that I have a bad (false) and a correct (true) installation.
 

Attachments

  • Immagine 2022-06-16 120340.png
    Immagine 2022-06-16 120340.png
    21.8 KB · Views: 13
I was also receiving mails with error message
Failed to reset cache for the instance #2: Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.
Following Security best pracises (see here and here) I have moved 'wp-config.php' outside of root (one directory above the web root) and the wordpress core files into its own directory called 'wp'.

Can I tell already registered entries in WPTK where to correctly find the core files? If so, how? How should I pass --path=`path/to/wordpress` ?
 
WordPress directory must match the following requirements:
  1. contain wp-content folder;
  2. contain wp-includes folder;
  3. contain the wp-config.php file in the current or parent directory.
For any other configuration WPTK may incorrectly detect the "main" WordPress path that is used for interaction via wp-cli. The wrong directory (or directory that cannot be recognized as WP directory by wp-cli) can cause this error.

Nowadays WPTK doesn't support any other customizations. You can check the path by using this command:
plesk ext wp-toolkit --list
 
Back
Top