WordPress.org

Make WordPress Core

Opened 11 months ago

Closed 7 months ago

#24480 closed defect (bug) (fixed)

404 error when creating a new site when WP is in a subfolder

Reported by: Denis-de-Bernardy Owned by: dd32
Milestone: 3.7 Priority: normal
Severity: minor Version:
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

With WP placed in a subfolder, i.e.:

/index.php
/wp-config.php
/wp <-- WP in here

You get a 404 error when creating a site. It redirects you to /wp-admin/install.php instead of /wp/wp-admin/install.php

Change History (5)

comment:1 SergeyBiryukov10 months ago

  • Component changed from General to Upgrade/Install

Confirmed. When trying to install from the root URL, wp_guess_url() does not detect that WP is in the subdirectory. Installing from /wp/ works correctly though.

Related: [8182], [15680].

Last edited 10 months ago by SergeyBiryukov (previous) (diff)

comment:2 dd327 months ago

  • Milestone changed from Awaiting Review to 3.7
  • Owner set to dd32
  • Status changed from new to accepted

comment:3 dd327 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 25385:

When the WordPress files are in a subdirectory, correctly redirect the user to the setup-config.php page from the parent directories index.php. Fixes #24480

comment:4 dd327 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

still need to cover the wp-admin/install.php redirect for when a wp-config.php file already exists.

comment:5 dd327 months ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 25396:

Fix wp_guess_url() to work in every scenario I could find, allows us to use it to determine the correct path to the WordPress Site URL before installation for install.php and setup-config.php redirects. Fixes #24480 Fixes #16884

Note: See TracTickets for help on using tickets.