Hi everyone,
I'm the person responsible for WordPress Toolkit on R&D side. Sorry to hear about your troubles with WPT -- let me explain what's going on with the '
WP_AUTO_UPDATE_CORE' constant added to
wp-config.php file. I'm going to assume that not everyone here is a WordPress expert, so I hope you'll forgive me if I state something you already know. TLDR version is also available at the bottom, if you're short on time.
What is 'WP_AUTO_UPDATE_CORE' constant?
The '
WP_AUTO_UPDATE_CORE' constant in
wp-config.php file is a standard WordPress constant (see
https://wordpress.org/support/article/editing-wp-config-php/#disable-wordpress-core-updates, for example). Usually you would add this constant to your
wp-config.php file in one of two cases:
- You need to completely disable automatic WordPress updates altogether.
- You want to automatically install all, even major (e.g., 5.2 > 5.3) WordPress updates.
You might notice that a third case is missing: automatically install only minor/security (e.g., 5.2.1 > 5.2.2) updates. You can use '
WP_AUTO_UPDATE_CORE' constant to address this case as well, but you don't have to -- this case is the default WordPress behavior. In other words, WordPress defaults to this behavior if '
WP_AUTO_UPDATE_CORE' constant is missing from
wp-config.php.
As you see, by adding this constant with its default setting to
wp-config.php file, WordPress Toolkit does not actually change any site data or user settings -- it merely exposes the existing default WordPress autoupdate setting.
Why WordPress Toolkit adds this constant to wp-config.php?
WordPress Toolkit uses this constant to determine if a WordPress site needs to be updated whenever the update is available. The constant is added if it's missing to make autoupdates management standardized and transparent to users. It is also needed to make sure the autoupdate experience in WPT works properly at all times. Adding this constant also means the following can happen:
- Users can manually change the constant, and these changes will be accepted by WordPress Toolkit.
- If users have already added this constant by themselves before the site was connected to WPT, it will be accepted by WPT.
Why can't WordPress Toolkit remove this constant when you uninstall it?
Removing the constant from
wp-config.php would be problematic due to the following reasons:
- Users might have added the constant by themselves before the site was connected to WordPress Toolkit, so deleting it will remove actual user data/settings.
- Users might have changed WordPress autoupdate behavior either via WordPress Toolkit or via direct modification of this constant, so, again, deleting it will remove actual user data/settings.
In other words, WPT leaves this constant to make sure that WordPress site is autoupdated the way its owner wants even after WordPress Toolkit is uninstalled.
PS. The WPT-related comment added to this constant hasn't been relevant for quite some time, so we will remove it in the next WordPress Toolkit release. Hopefully this should alleviate the potential customer confusion.
TLDR version: There is no need to remove the '
WP_AUTO_UPDATE_CORE' constant from
wp-config.php, since it will either make zero practical difference or will make things worse, if your users added it by themselves. You can remove the comment next to the constant as it is not relevant and might confuse customers.
Hope this helps -- let me know if you have any questions.