Skip to content

Add admin credentials to interactive site creation flow#2682

Merged
bcotrim merged 1 commit intotrunkfrom
add-credentials-to-interactive-create
Mar 9, 2026
Merged

Add admin credentials to interactive site creation flow#2682
bcotrim merged 1 commit intotrunkfrom
add-credentials-to-interactive-create

Conversation

@bcotrim
Copy link
Copy Markdown
Contributor

@bcotrim bcotrim commented Feb 27, 2026

Related issues

Proposed Changes

  • Add interactive prompts for admin username, password, and email during studio site create
  • Username prompt shows "admin" as default and validates input
  • Password prompt is masked with asterisks, allows empty input for auto-generation
  • Email prompt shows "admin@localhost.com" as default
  • Credentials still work via CLI flags when non-interactive mode is used
  • All prompts respect precedence: CLI flags override interactive input

Testing Instructions

  • Run studio site create in interactive mode and verify:
    • You're prompted for admin username (after HTTPS setup)
    • You're prompted for admin password (masked input, press Enter to auto-generate)
    • You're prompted for admin email with default admin@localhost.com
    • Pressing Enter uses the default values
    • Invalid usernames show validation errors
    • Invalid emails show validation errors
  • Run studio site create --admin-username custom --admin-password secret and verify:
    • Interactive prompts are skipped (flags are respected)
    • Site is created with provided credentials
  • Test with Blueprints containing login credentials and verify they still work

Pre-merge Checklist

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

@wpmobilebot
Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 7ea98b5 vs trunk

site-editor

Metric trunk 7ea98b5 Diff Change
load 1426.00 ms 1444.00 ms +18.00 ms ⚪ 0.0%

site-startup

Metric trunk 7ea98b5 Diff Change
siteCreation 7080.00 ms 7119.00 ms +39.00 ms ⚪ 0.0%
siteStartup 3945.00 ms 3941.00 ms -4.00 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@bcotrim bcotrim requested a review from a team March 5, 2026 21:42
Copy link
Copy Markdown
Contributor

@katinthehatsite katinthehatsite left a comment

Choose a reason for hiding this comment

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

The changes worked for me 👍

Image

Everything was then correctly reflected in the Studio UI.

One note that to test this, I need to first run these commands to activate the interactive mode:

  • npm run cli:build
  • node dist/cli/main.js site create

It might be something on my end but wanted to note it down in case someone comes across a similar issue

@bcotrim bcotrim merged commit 5e19a16 into trunk Mar 9, 2026
10 checks passed
@bcotrim bcotrim deleted the add-credentials-to-interactive-create branch March 9, 2026 10:35
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