Skip to content

Conversation

@wojtekn
Copy link
Contributor

@wojtekn wojtekn commented Dec 16, 2025

Related issues

Proposed Changes

Studio only disabled auto-updates when the setting was off, but didn't actively enable them when on. This meant WordPress sites with auto-updates already disabled in their database wouldn't respect Studio's enable setting.

This PR ensures Studio's auto-update setting is the source of truth by explicitly enabling auto-updates when isWpAutoUpdating is true.

Testing Instructions

  1. Create a site using WordPress 6.8
  2. Open WP Admin
  3. Confirm the site uses 6.8.3
  4. Navigate to Updates and confirm that auto updates are disabled:

This site will not receive automatic updates for new versions of WordPress

  1. Open Studio site in Terminal
  2. Disable auto-updates in WP using option:
wp option set auto_update_core_major unset
  1. Stop Studio
  2. Update site in appdata-v1.json file and set isWpAutoUpdating to true
  3. Start Studio
  4. Open WP Admin
  5. Navigate to Updates and confirm that auto updates are enabled

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn requested a review from a team December 16, 2025 12:05
@wojtekn wojtekn self-assigned this Dec 16, 2025
@github-actions
Copy link
Contributor

📊 Performance Test Results

Comparing 017fecf vs trunk

site-editor

Metric trunk 017fecf Diff Change
load 11435.00 ms 8307.00 ms -3128.00 ms 🟢 -27.4%

site-startup

Metric trunk 017fecf Diff Change
siteCreation 22475.00 ms 20584.00 ms -1891.00 ms 🟢 -8.4%
siteStartup 10008.00 ms 9986.00 ms -22.00 ms 🟢 -0.2%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change

@wojtekn wojtekn changed the title Fix auto-updates not being enforced when enabled in Studio Fix WP auto-updates not being enforced when enabled in Studio Dec 16, 2025
Copy link
Member

@sejas sejas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirm it works as expected and after running wp option set auto_update_core_major unset I see the updates are still updated and the source of truth is Studio isWpAutoUpdating value.

Image

filename: '0-enable-auto-updates.php',
content: `<?php
// Enable auto-updates
add_filter( 'allow_dev_auto_core_updates', '__return_true' );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will make sites with a stable version automatically update to betas, but we should double-check.

Copy link
Contributor

@gavande1 gavande1 Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this filter will only run when you are on dev version. So it won't be automatically update stable versions to dev versions.
https://github.com/WordPress/wordpress-develop/blob/3a5da6c220aa50e1d928ec77257189ed353e4d0b/src/wp-admin/includes/class-core-upgrader.php#L346-L361

Copy link
Contributor

@gavande1 gavande1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested this and works as described. LGTM 👍

Image

@wojtekn wojtekn merged commit 85b6231 into trunk Dec 17, 2025
12 checks passed
@wojtekn wojtekn deleted the fix/enabling-auto-updates branch December 17, 2025 11:54
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.

3 participants