Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while using terminus command #287

Open
charansai1999 opened this issue Dec 5, 2023 · 2 comments
Open

Error while using terminus command #287

charansai1999 opened this issue Dec 5, 2023 · 2 comments

Comments

@charansai1999
Copy link

Platform

( ) MacOS

Installed Via

( ) Homebrew

PHP Version

( ) 8.3.0

Terminus Version

3.3.0

Command Executed

terminus wp purdue-university-northwest.dev -- pantheon session add-index
error

Expected behavior

Describe what you had expected the command to do. If your issue is with the Terminus Installer, please file your issue here:
https://github.com/pantheon-systems/terminus-installer/issues

Actual behavior

If your issue is with a command not working, please run the command again with the -vvv option (--debug in 0.x) and copy everything from the command down to the next prompt and paste it here between a pair of ``` marks.

@jazzsequence jazzsequence transferred this issue from pantheon-systems/terminus Dec 5, 2023
@jazzsequence
Copy link
Contributor

Moving to wp-native-php-sessions since the wp pantheon session add-index command is not a Terminus-specific command, but rather a WP-CLI command in the Native PHP Sessions plugin.

@jazzsequence
Copy link
Contributor

jazzsequence commented Dec 6, 2023

@charansai1999 The actual error message in the screenshot is saying that, on the Pantheon site you are trying to run the command on, there is no site with the domain dev.pnw.edu. This is not an issue with Terminus or the WP Native PHP Sessions plugin, per se, but, as stated above, the session add-index command is part of that plugin. However, the issue stands that the problem is not coming from either place but rather because WP-CLI doesn't understand what you are trying to do.

There are two things you should do:

  1. Validate that dev.pnw.edu exists on the site you are running the command on (purdue-university-northwest.dev)
  2. Pass the --url= flag to the command for whatever is the primary domain on the site. If this is a multisite, the --url flag will tell the command to only run on that domain but, at the very least, it should not return that error assuming the domain exists in the database.

Finally, there is a chance that you don't need to worry about this at all. The Native PHP Sessions plugin allows WordPress to handle PHP sessions appropriately, but not everyone needs it, and not every site does anything with PHP sessions. If you are not using PHP sessions anywhere in your site build, then you might not need the plugin at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants