Skip to content

Prefer pretty permalinks like WP install does #1832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

brandonpayton
Copy link
Member

@brandonpayton brandonpayton commented Sep 30, 2024

Motivation for the change, related issues

The WordPress installation process defaults to pretty permalinks if it can enable them and get a valid response from a loopback request. Unfortunately, at the time we run the WP installation process in Playground, the PHP request handler has not yet been put into place to handle those requests.

In addition, even if the request handler was in place in time, @adamziel mentioned:

I vaguely remember disabling the networking in installWordPress made for a dramatic installation speedup in web browsers

As a workaround, we can manually set the permalink_structure as part of WordPress installation within bootWordPress().

Closes #1644

Implementation details

Manually sets the permalink_structure as part of WordPress installation within bootWordPress().

Testing Instructions (or ideally a Blueprint)

Manual testing after creating nightly WP build which was pre-installed using this logic using Playground CLI. Loading the nightly build locally shows permalinks enabled.

@brandonpayton brandonpayton added [Type] Bug An existing feature does not function as intended [Aspect] WordPress [Feature] Boot Flow labels Sep 30, 2024
@brandonpayton brandonpayton requested a review from a team September 30, 2024 20:17
@brandonpayton brandonpayton self-assigned this Sep 30, 2024
@brandonpayton
Copy link
Member Author

I made these changes over the weekend but had trouble testing because the following line of bootWordPress() always seems to indicate WordPress has already been installed:

if (!(await isWordPressInstalled(php))) {

This is something I can look into later.

The change itself seems work fine if we hack bootWordPress() to always run the WP install process.

@adamziel adamziel force-pushed the trunk branch 2 times, most recently from 680cd19 to 2e376d2 Compare October 4, 2024 09:24
@brandonpayton brandonpayton force-pushed the default-to-pretty-permalinks-like-wp branch from 40803fe to bcf1ade Compare October 16, 2024 17:30
@brandonpayton brandonpayton marked this pull request as ready for review October 16, 2024 17:30
@brandonpayton brandonpayton merged commit 2034e5e into trunk Oct 16, 2024
9 checks passed
@brandonpayton brandonpayton deleted the default-to-pretty-permalinks-like-wp branch October 16, 2024 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] WordPress [Feature] Boot Flow [Type] Bug An existing feature does not function as intended
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

WordPress does not default to pretty permalinks in Playground
1 participant