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

Redirect Loop when custom domain name is used. #22

Open
themeszone opened this issue Mar 3, 2020 · 3 comments
Open

Redirect Loop when custom domain name is used. #22

themeszone opened this issue Mar 3, 2020 · 3 comments

Comments

@themeszone
Copy link

Hello Guys

First of all thanks for a great starter kit.
The issue appears when a custom URL is used in "create-wp-react-app create-workspace" wizard
It can be fixed by changing "siteurl" and "home" option in wp_options table to the custom url entered during workspace creation.

@matzeeable
Copy link
Member

Hi!

Thanks for your issue report. What do you mean exactly? How does your command look like exactly?

@themeszone
Copy link
Author

themeszone commented Mar 3, 2020

While creating a new workspace 2nd prompt asks for URL that should be used for WordPress development:
see screenshot below:
https://www.evernote.com/l/ACfWwTRiX7dBlLPsTPAwsBrIXatf0sHiBrw
After the setup is finished and I run "yarn docker:start" and then I go to the URL provided I get a Redirect Loop.

To fix that I have to open phpMyAdmin and change siteurl and home option in wp_options table to the URL provided

@matzeeable
Copy link
Member

Hi @themeszone !

Sorry for the late response. Can you please do a test for me so I can ensure where I have to look because I can not reprocedure the issue:

  1. Run yarn docker:purge; it completely removes the WP instance
  2. Run docker:start
  3. Check if issues happens again

if ! $(wp --allow-root core is-installed); then
# Install wordpress itself
wp --allow-root core install --path="/var/www/html" --url="$_WP_CI_INSTALL_URL" --title="wpdev" --admin_user=wordpress --admin_password=wordpress --admin_email=admin@test.com
# Config parameters
wp --allow-root config set WP_DEBUG true --raw
wp --allow-root config set SCRIPT_DEBUG true --raw
wp --allow-root config set FS_METHOD direct # see https://git.io/fj4IK, https://git.io/fj4Ii
# Permalink structure
wp --allow-root rewrite structure '/%year%/%monthnum%/%postname%/' --hard
# Import startup.sql script if available
test -f "/scripts/startup.sql" && wp --allow-root db import /scripts/startup.sql
fi

Inside this if statement the WordPress instance gets installed. Usually, the wp core install command makes sure the options siteurl and home are set correctly. Perhaps you can figure this out and open a PR. 🙂

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

No branches or pull requests

2 participants