-
Notifications
You must be signed in to change notification settings - Fork 5
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
wp config simplifed to avoid complications on non live envs #17
Open
carl-alberto
wants to merge
4
commits into
pantheon-systems:main
Choose a base branch
from
carl-alberto:15-config-simplify
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4
−12
Open
Changes from 2 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fc98619
Update pantheon.php to declare WP_ALLOW_MULTISITE before loading netw…
carl-alberto c0f85b4
Update initial config to be simplified and works best on non live envs
carl-alberto bea4ce6
Merge branch 'pantheon-systems:main' into 15-config-simplify
carl-alberto 5c83f6f
Updated config if users are not using Pantheon and Lando
carl-alberto File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,9 +25,6 @@ | |
if ( defined( 'WP_CLI' ) && WP_CLI ) { | ||
require_once 'inc/cli.php'; | ||
} | ||
if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) { | ||
require_once 'inc/pantheon-network-setup.php'; | ||
} | ||
if ( ! defined( 'FS_METHOD' ) ) { | ||
/** | ||
* When this constant is not set, WordPress writes and then deletes a | ||
|
@@ -45,6 +42,9 @@ | |
if ( getenv( 'FRAMEWORK' ) === 'wordpress_network' && ! defined( 'WP_ALLOW_MULTISITE' ) ) { | ||
define( 'WP_ALLOW_MULTISITE', true ); | ||
} | ||
if ( defined( 'MULTISITE' ) && defined( 'WP_ALLOW_MULTISITE' ) && WP_ALLOW_MULTISITE ) { | ||
require_once 'inc/pantheon-network-setup.php'; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These lines are unrelated and merged in #21. Can you remove these from the PR? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the review. merged with the latest branch |
||
if ( defined( 'WP_ALLOW_MULTISITE' ) && ( ! defined( 'MULTISITE' ) || empty( MULTISITE ) ) ) { | ||
require_once 'inc/pantheon-multisite-finalize.php'; | ||
} | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tested with Lando to confirm dropping the hard-coded hostname doesn't break anything locally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with Lando and found issues:
lando wp
cli commands:PHP Notice: Undefined index: HTTP_HOST in phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1296) : eval()'d code on line 90
lando wp search-replace
with--all-tables
flag to include thewp_blogs
&wp_site
entries to be updatedUpdated my PR to to fix the 1
For the 2 error, we might need to add a more verbose error to the generic error
Error establishing a database connection
to make sure that all the URLs are replaced accordingly