3

I have a client site that's under version control using Git. The single repository is at the Wordpress root level, but it is set to ignore everything except for theme and plugin files. I did some research into best practices and found some content on submodules, which I might try next time, but at the moment, I'm wondering if there's a way to achieve both of the following:

  1. Keep the Git repository structured as is at the WordPress root but effectively only use it to version control theme and plugins in a single repository.
  2. Enable automatic WordPress core updates and get around this error: This site appears to be under version control. Automatic updates are disabled.

This site appears to be under version control. Automatic updates are disabled.

1
4

Adding this filter in a must-use plugin or functions.php will allow automatic updates even if the site is under version control:

add_filter( 'automatic_updates_is_vcs_checkout', '__return_false', 1 );

From https://developer.wordpress.org/reference/hooks/automatic_updates_is_vcs_checkout/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.