Skip to content
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

Initial version of subcommand bedrock init #58

Open
wants to merge 24 commits into
base: trunk
Choose a base branch
from

Conversation

s-allius
Copy link

No description provided.

@s-allius
Copy link
Author

This pull request deals with some problems that arise from the use of Bedrock Roots.
There is a conflict around the definition of WP_CACHE. WP rocket normally sets and deletes this in the wp-config.php file. Under bedrock this definition is moved into the bedrock configuration (usually the .env file). In wp rocket there is a filter rocket_set_wp_cache_constant to switch off writing to wp-config.php. At the moment this filter is not respected by the wp-cli subcommands for wp rocket.
The solution could be to use the new command wp rocket bedrock-init. The user can set the flag WP_CACHE in his bedrock config and call wp rocket bedrock-init during the deployment.This initialises the WP rocket plugin and activates or deactivates it depending on the value of WP_CACHE.

The pull request addresses another issue that occurs on shared web servers. There, the absolute paths from the point of view of the shared web server differ from the paths of the user application. Normally WP Rocket detects this during the installation by means of the web server configuration. When using wp-cli, wp rocket does not run in the context of a web server and the paths in advanced-cache.php are set incorrectly. With the parameter '--vhost-dir' an appropriate prefix can be specified and the file advanced-cache.php is created correctly for the target web server

@s-allius s-allius changed the title Intial version of subcommand bedrock init Initial version of subcommand bedrock init Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant