[wp-trac] [WordPress Trac] #43284: Drop-in: Disabling "wp_install_defaults" affect permalinks & "/login" redirect

WordPress Trac noreply at wordpress.org
Sat Aug 4 09:38:17 UTC 2018


#43284: Drop-in: Disabling "wp_install_defaults" affect permalinks & "/login"
redirect
-----------------------------+------------------------------
 Reporter:  rajitrazaki      |       Owner:  (none)
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Awaiting Review
Component:  Upgrade/Install  |     Version:  4.9.4
 Severity:  normal           |  Resolution:
 Keywords:  close            |     Focuses:
-----------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => close


Comment:

 Hi @rajitrazaki, welcome to WordPress Trac! Thanks for the report, sorry
 it took a while for someone to get back to you.

 > Strangely it also disable default permalinks setting (it not select "Day
 and name" but "Plain" instead), even though permalinks is on different
 function `wp_install_maybe_enable_pretty_permalinks`.

 That's because `wp_install_maybe_enable_pretty_permalinks()`
 [https://core.trac.wordpress.org/browser/tags/4.9.8/src/wp-
 admin/includes/upgrade.php?marks=376-395#L374 checks if the 'hello-world'
 post is available], and then submits a request to check if it could be
 loaded successfully. Otherwise, it assumes that the server does not
 support pretty permalinks.

 I don't see a core issue here. If your server does support pretty
 permalinks, you can just set the desired structure manually in your
 `wp_install_defaults()` function:
 {{{
 update_option( 'permalink_structure',
 '/%year%/%monthnum%/%day%/%postname%/' );
 }}}

 > It also not redirect `/login/` to `/wp-login.php`.

 This redirect depends on pretty permalinks being enabled.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43284#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list