Site shell not working, "Did you mean 'db'?"

Trying to use the Site shell / WP CLI form the WP local app results in a console windows with errors and no shell. Trying to open WP Shell from the terminal in VSCode gives me a mysqli_real_connect error, but I found that’s normal and to use the Site shell button.

The following errors are given:

Setting Local environment variables…

WP-CLI: WP-CLI 2.10.0
Composer: Composer version 2.6.2 2023-09-03 14:09:15
PHP: 8.2.20
MySQL: mysql Ver 8.0.16 for Win64 on x86_64 (MySQL Community Server - GPL)

Loaded Shell for Local Site: devtest

C:\Users\xxx\Local Sites\devtest\app\public>wp shell
Warning: Temp directory isn’t writable: C:\Windows\TEMP/
Error: ‘-c’ is not a registered wp command. See ‘wp help’ for available commands.
Did you mean ‘db’?


What steps can be taken to replicate the issue? Feel free to include screenshots, videos, etc

Open up the site shell…

System Details

  • Local Version:
    Version 9.0.5+6706
    PHP 8.2.20
    MySQL 8.0.16
    WP 6.6.2
  • Operating System (OS) and OS version:
    Win 11, latest updates

Hey @HG3000!

The warning Temp directory isn’t writable: C:\Windows\TEMP/ indicates that WP-CLI cannot write to the Windows temp directory. This can happen due to insufficient permissions for the user or application trying to write to the directory. So you could try checking the permissions of the specific directory, or make sure you’re running the application as admin user.

  • Navigate to C:\Windows\TEMP.
  • Right-click the folder and select Properties.
  • Go to the Security tab.
  • Ensure that your user or the appropriate group has Write permissions.
  • If permissions are not correct, click Edit, and adjust them to give the necessary write permissions.

Hi Nick,

Thanks for the reply. My user, admins and system have write access to this folder. It’s just Windows default settings. I don’t really change folder permissions on my local computer :smile:
Not sure which group is “the appropriate group”, but my best guess would be system?

Any idea about the other errors?

The error referring to the command might be an indicator that things weren’t installed correctly or fully. You could try running wp --info to see what that shows.

Do you have any antivirus, security, or firewall applications that could be infering?

Are you running other developer applications simultaneously? Apps like MAMP, XAMPP, or Docker for example.

No, it’s just Local. I’ve had XAMP in the past, but that’s not running
And no third party firewalls and such installed

This is the result of wp --info, ran from the console that opens when I click Site Shell

Setting Local environment variables…

WP-CLI: WP-CLI 2.10.0
Composer: Composer version 2.6.2 2023-09-03 14:09:15
PHP: 8.2.20
MySQL: mysql Ver 8.0.16 for Win64 on x86_64 (MySQL Community Server - GPL)

Loaded Shell for Local Site: devtest

C:\Users\xxx\Local Sites\devtest\app\public>wp --info
OS: Windows NT 10.0 build 22631 (Windows 11) AMD64
Shell: C:\WINDOWS\system32\cmd.exe
PHP binary: C:\Users\xxx\AppData\Roaming\Local\lightning-services\php-8.2.20+0\bin\win64\php.exe
PHP version: 8.2.20
php.ini used: C:\Users\xxx\AppData\Roaming\Local\run\PaohadROQ\conf\php\php.ini
MySQL binary:
MySQL version:
SQL modes:
WP-CLI root dir: phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir: phar://wp-cli.phar/vendor
WP_CLI phar path: C:\Users\xxx\Local Sites\devtest\app\public
WP-CLI packages dir:
WP-CLI cache dir: C:\Users\xxx/.wp-cli/cache
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.10.0

Can you also share your Local Log as well? Retrieving Local’s Log File

Thank you!

Of course. I notice most of my sites are on mysql, so I tried one with MariaDB as well. That also didn’t work, but gave a different error :sweat_smile:

Setting Local environment variables…

WP-CLI: WP-CLI 2.10.0
Composer: Composer version 2.6.2 2023-09-03 14:09:15
PHP: 8.2.20
MySQL: mysql Ver 15.1 Distrib 10.4.32-MariaDB, for Win64 (AMD64), source revision c4143f909528e3fab0677a28631d10389354c491

Loaded Shell for Local Site: Quined

C:\Users\xxxx\Local Sites\quined\app\public>wp shell
Error: ‘-c’ is not a registered wp command. See ‘wp help’ for available commands.
Did you mean ‘wc’?

The log:

> {"class":"Process","level":"warn","message":"2024-10-04T07:05:52.330131Z 0 [System] [MY-010116] [Server] %%userDataPath%%\\lightning-services\\mysql-8.0.16+6\\bin\\win64\\bin\\mysqld.exe (mysqld 8.0.16) starting as process 7036","process":"mysql","thread":"main","timestamp":"2024-10-04T07:05:54.011Z"}
> {"class":"Process","level":"warn","message":"2024-10-04T07:05:52.331758Z 0 [Warning] [MY-013243] [Server] --character-set-server: The character set UTF8MB3 is deprecated and will be removed in a future release. Please consider using UTF8MB4 instead.","process":"mysql","thread":"main","timestamp":"2024-10-04T07:05:54.012Z"}
> {"class":"Process","level":"warn","message":"2024-10-04T07:05:53.048938Z 0 [System] [MY-010229] [Server] Starting crash recovery...","process":"mysql","thread":"main","timestamp":"2024-10-04T07:05:54.012Z"}
> {"class":"Process","level":"warn","message":"2024-10-04T07:05:53.055913Z 0 [System] [MY-010232] [Server] Crash recovery finished.","process":"mysql","thread":"main","timestamp":"2024-10-04T07:05:54.012Z"}
> {"class":"Process","level":"warn","message":"2024-10-04T07:05:53.978700Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.","process":"mysql","thread":"main","timestamp":"2024-10-04T07:05:54.012Z"}
> {"class":"Process","level":"warn","message":"2024-10-04T07:05:54.011571Z 0 [System] [MY-010931] [Server] %%userDataPath%%\\lightning-services\\mysql-8.0.16+6\\bin\\win64\\bin\\mysqld.exe: ready for connections. Version: '8.0.16'  socket: ''  port: 10118  MySQL Community Server - GPL.","process":"mysql","thread":"main","timestamp":"2024-10-04T07:05:54.013Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] Starting MariaDB 10.4.32-MariaDB source revision c4143f909528e3fab0677a28631d10389354c491 as process 48996","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.530Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.572Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Uses event mutexes","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.573Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Compressed tables use zlib 1.3","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.573Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Number of pools: 1","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.575Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Using SSE2 crc32 instructions","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.576Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Initializing buffer pool, total size = 32M, instances = 1, chunk size = 32M","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.578Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Completed initialization of buffer pool","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.580Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:16 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=290249110","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:16.599Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: 128 out of 128 rollback segments are active.","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.856Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: Removed temporary tablespace data file: \"ibtmp1\"","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.857Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: Creating shared tablespace for temporary tables","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.857Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: Setting file '.\\ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.858Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: File '.\\ibtmp1' size is now 12 MB.","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.858Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: Waiting for purge to start","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.859Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: 10.4.32 started; log sequence number 290249119; transaction id 40423","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.913Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: Loading buffer pool(s) from %%userDataPath%%\\run\\kMCvcK32k\\mariadb\\data\\ib_buffer_pool","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.914Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] Plugin 'FEEDBACK' is disabled.","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.914Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] InnoDB: Buffer pool(s) load completed at 241004  9:07:17","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.929Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:17 0 [Note] Server socket created on IP: '127.0.0.1'.","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:17.948Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:18 0 [Note] Reading of all Master_info entries succeeded","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:18.167Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:18 0 [Note] Added new Master_info '' to hash table","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:18.168Z"}
> {"class":"Process","level":"warn","message":"2024-10-04  9:07:18 0 [Note] %%userDataPath%%\\lightning-services\\mariadb-10.4.32+0\\bin\\win32\\bin\\mysqld.exe: ready for connections.","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:18.168Z"}
> {"class":"Process","level":"warn","message":"Version: '10.4.32-MariaDB'  socket: ''  port: 10022  mariadb.org binary distribution","process":"mariadb","thread":"main","timestamp":"2024-10-04T07:07:18.168Z"}

Some of the errors still seem like there could be a permissions issue. Can you verify these settings?

Additionally, is there anything unique about your connection? Do you use an office/work network, VPN, hotspot, broadband, etc? Some of the errors I’ve seen before also when users systems weren’t able to make connections with wordpress.org.

The Users group did not have write permissions for the C:\Program Files (x86)\Local folder, so I changed that. That removed the Warning: Temp directory isn’t writable: C:\Windows\TEMP/, but still did not get shell working unfortunately.

The internet connection is as vanilla as it can be, not vpn’s, tunnels or business connections.
Wordpress.org is also reachable

Let’s try one big refresh here and see if that helps:

  • Export any sites that you have on Local and save them to a folder somewhere on your computer: Backup a Local Site - Local

  • Fully uninstall Local from your computer including the Windows specific steps here: Uninstall Local - Local

  • Install the latest version of Local on this link: Releases - Local

  • Once installed, please restart the computer.

  • When the computer is restarted and turned on, close any applications that automatically run in the background (AntiVirus, Firewall, and other Developer applications included).

  • Check and see if the issue still persists. If so, please provide us with an updated log. There are some different ways to access and share Local Logs. For us to be able to troubleshoot thoroughly, please click the Download Local Logs button from the Support tab in Local. This will generate a zip archive that contains the Local log along with some other diagnostic information to help quickly zero in on any issues that Local is encountering. You can drag and drop that zip file into the comment box to attach it.

Just a quick update, I’m working on this but there are lots of sites to export so this will take a while.

I’ll report back when it’s done

No problem @HG3000 - if you have a lot of sites and it’s too cumbersome we can continue to try and investigate this further before you do that reset.

Could you share a full Local log however with the steps I mentioned at the bottom of my last comment?

Yes, sure. Any chance i can send that privately?

Of course! I’ll send you a DM you can reply to.

Hi Nick,

I sent you the logs a little while ago. Did you see anything in them?

Thanks! Haiko

I did and thank you! Sorry for not following up here. Our team is readying a new Local version that includes some patches. When that’s ready I was going to share it here for you to test with it. Stay tuned!