wp-native-php-sessions icon indicating copy to clipboard operation
wp-native-php-sessions copied to clipboard

Error while using terminus command

Open charansai1999 opened this issue 1 year ago • 2 comments

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.

charansai1999 avatar Dec 05 '23 20:12 charansai1999

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 avatar Dec 05 '23 20:12 jazzsequence

@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.

jazzsequence avatar Dec 06 '23 21:12 jazzsequence