Opened 3 years ago
Last modified 2 years ago
#43284 new defect (bug)
Drop-in: Disabling "wp_install_defaults" affect permalinks & "/login" redirect
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.4 |
Component: | Upgrade/Install | Keywords: | close |
Focuses: | Cc: |
Description
I want to prevent default "Uncategorized" category, first post (Hello world!), first page, and default widgets.
I need to disable wp_install_defaults
. So, I created Drop-in /wp-content/install.php
which contains:
<?php function wp_install_defaults() { } ?>
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
.
It also not redirect /login/
to /wp-login.php
.
Change History (2)
Note: See
TracTickets for help on using
tickets.
Hi @rajitrazaki, welcome to WordPress Trac! Thanks for the report, sorry it took a while for someone to get back to you.
That's because
wp_install_maybe_enable_pretty_permalinks()
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:This redirect depends on pretty permalinks being enabled.