wecodemore / wpstarter

Easily bootstrap whole site Composer packages for WordPress.
https://wecodemore.github.io/wpstarter/
MIT License
246 stars 35 forks source link

Too many redirect on brand new project #93

Closed matepaiva closed 2 years ago

matepaiva commented 5 years ago

Describe the bug I tried at least 3 times to create a hello world project using the quick start and the complete install and I always end up in a "too many redirects" when I go to / end get redirected to /wp/wp-admin/install.php.

To Reproduce Steps to reproduce the behavior:

  1. mkdir new-project && cd new-project
  2. Create a composer.json with below:
    {
    "name": "gmazzap/wpstarter-simple-example",
    "description": "Example project for WordPress + Composer + WP Starter",
    "type": "project",
    "repositories": [
        {
            "type": "composer",
            "url": "https://wpackagist.org"
        }
    ],
    "require": {
        "wecodemore/wpstarter": "~2.0",
        "wpackagist-plugin/wp-super-cache": "*"
    },
    "config": {
        "vendor-dir": "wp-content/vendor"
    },
    "scripts": {
        "post-install-cmd": "WCM\\WPStarter\\Setup::run",
        "post-update-cmd": "WCM\\WPStarter\\Setup::run"
    },
    "extra": {
        "wordpress-install-dir": "wp"
    }
    }
  3. Create a mysql database.
  4. Create a .env with below:
    WORDPRESS_ENV=development
    DB_NAME=xxx
    DB_USER=xxx
    DB_PASSWORD=xxx
  5. Start the project web server with wp server
  6. Visit page http://localhost:8080
  7. See error ERR_TOO_MANY_REDIRECTS.

Expected behavior To get in wp admin install

System (please complete the following information):

Additional context Tried else with wpstarter^3.

lkraav commented 5 years ago

This is because you need wp server --docroot=public - remember, your WP core files are not in project root.

pj035 commented 5 years ago

I have the same problem and I'm not sure how @lkraav's answer will help (because I'm new to wordpress). I have tried wp server --docroot=public, which complains about a missing dir public and if I create it, the server responds with a 404 on /.

Edit: It seems that wp server --docroot=public is related to wpstarter version 3. That one seems to work, even tho there are other problems.

gmazzap commented 2 years ago

Closing this for lack of activiyt and it seems there's nothing to fic.

@pj035 v3 is what we support right now.