devowlio / wp-react-starter

🚀WordPress Plugin Boilerplate using modern web techs like TypeScript, SASS, and so on... on top of a local development environment with Docker and predefined GitLab CI for continous integration and deployment!
https://devowl.io/wp-react-starter/
Other
390 stars 50 forks source link

Redirect Loop when custom domain name is used. #22

Open themeszone opened 4 years ago

themeszone commented 4 years ago

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 commented 4 years ago

Hi!

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

themeszone commented 4 years ago

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 commented 4 years ago

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

https://github.com/devowlio/wp-react-starter/blob/05d325ef6808a4143097439e73345d7c9b2bf364/devops/scripts/container-wordpress-command.sh#L32-L46

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