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

Track parts of wp-config.php #630

JanVoracek opened this Issue Jan 19, 2016 · 0 comments


None yet
2 participants
Copy link

JanVoracek commented Jan 19, 2016

Since #211, VersionPress doesn't track wp-config.php because it contains primarily environment-specific settings. However, some of the constants / variables are common for all environments. For example constants for custom directory layout like WP_CONTENT_DIR or WP_PLUGIN_DIR. These constants should be versioned (unlike for example DB_NAME).

Here are some ways to do it:

  • Create some versioned section in wp-config.php. Then will VP copy this part of config to some separate file and commit it. Also it has to check for changes in this section and commit them automatically.
  • Add simple require of file common to all environments to the wp-config.php. The user will update this file instead of wp-config.php if he will set something to all environments. Also VP will extract some whitelisted constants / variables to this file during the initialization. 🏆
  • Save the constants / variables as options.

We choose the second choice. It looks like the most intuitive and easier to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment