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

Using --promt on 'wp core install' creates a https:// instead of http:// URL #203

Open
2 tasks done
luminuu opened this issue Apr 21, 2022 · 2 comments
Open
2 tasks done

Comments

@luminuu
Copy link

luminuu commented Apr 21, 2022

Bug Report

Describe the current, buggy behavior

When running wp core install --prompt and use an URL with http:// at the beginning, the URL will be changed to https:// in the database.

Describe how other contributors can replicate this bug

  • Prepare local install (server, database, download WP files)
  • Run wp core install --prompt
  • When asked for the URL, write a URL with http:// in the beginning, e.g. http://wp60.test
  • Finish the prompt
  • Check the options table in the database for home and siteurl entires: the URL should be https://wp60.test
  • When trying to open /wp-admin, it always redirects to https://

Describe what you would expect as the correct outcome

When stating an URL with http://, it should be added as http:// to the database and not be converted to https://.

Let us know what environment you are running this on

jessica@Jessicas-MBP wp60.test % wp cli info
OS:	Darwin 21.4.0 Darwin Kernel Version 21.4.0: Mon Feb 21 20:34:37 PST 2022; root:xnu-8020.101.4~2/RELEASE_X86_64 x86_64
Shell:	/bin/zsh
PHP binary:	/Applications/MAMP/bin/php/php8.1.0/bin/php
PHP version:	8.1.0
php.ini used:	/Applications/MAMP/bin/php/php8.1.0/conf/php.ini
MySQL binary:	/Applications/MAMP/Library/bin//mysql
MySQL version:	mysql  Ver 14.14 Distrib 5.7.34, for osx10.12 (x86_64) using  EditLine wrapper
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:	/Users/jessica/Sites/wp60.test
WP-CLI packages dir:	/Users/jessica/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version:	2.6.0

Also running MAMP Pro 6.6 on macOS Monterey (12.3).

Provide additional context/Screenshots

See this Twitter thread, where @pixolin kindly tested this on his machine (different setup, but same problem): https://twitter.com/pixolin/status/1517132670899081216

@pixolin
Copy link

pixolin commented Apr 21, 2022

See this Twitter thread, where @pixolin kindly tested this on his machine (different setup, but same problem):

Here is the envirnoment I tested with:

❯ wp --info
OS:     Linux 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64
Shell:  /usr/bin/zsh
PHP binary:     /usr/bin/php8.0
PHP version:    8.0.17
php.ini used:   /etc/php/8.0/cli/php.ini
MySQL binary:   /usr/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.5.15-MariaDB, for debian-linux-gnu (aarch64) using  EditLine wrapper
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:       /var/www/jessica.test
WP-CLI packages dir:    /home/pi/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.6.0

Using command wp core install --title=jessica.test --url=http://jessica.test --admin_user=admin --admin_password=password --admin_email=wp@jessica.test --skip-email resulted in a correct database entry for wp_options fields siteurl and home.

@Zodiac1978
Copy link

Zodiac1978 commented Apr 21, 2022

Maybe related to #5335

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

No branches or pull requests

4 participants