Skip to content

Webtrees: use PHP CLI for initial setup instead of curl to setup wizard - #14818

Merged
CrazyWolf13 merged 1 commit into
mainfrom
fix/webtrees-cli-setup
May 31, 2026
Merged

Webtrees: use PHP CLI for initial setup instead of curl to setup wizard#14818
CrazyWolf13 merged 1 commit into
mainfrom
fix/webtrees-cli-setup

Conversation

@MickLesk

Copy link
Copy Markdown
Member

✍️ Description

Replaced the fragile sleep 5 + curl POST setup wizard approach with php index.php config-ini, php index.php user Admin --create, and php index.php user-setting - as recommended by webtrees upstream author fisharebest.

🔗 Related Issue

Fixes #14733

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to script metadata (PocketBase/website data).
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

@MickLesk
MickLesk requested a review from a team as a code owner May 30, 2026 19:48
@github-actions github-actions Bot added refactor update script A change that updates a script labels May 30, 2026
@CrazyWolf13
CrazyWolf13 merged commit 4da4a47 into main May 31, 2026
2 checks passed

@dsfgorski dsfgorski left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi.
This doesn't work properly for me with error:
[ERROR] in line 59: exit code 1 (General error / Operation not permitted): while executing command sudo -u www-data php /opt/webtrees/index.php user Admin --create --real-name="Administrator" --email="admin@example.com" --password="${WT_ADMIN_PASS}"

In Connection.php line 838:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webtrees.wt_user' doesn't exist (Connection: default, Host: 127.0.0.1, Port: 3306, Database: webtrees, SQL: select * from wt_user where user_id > 0 order by real_name asc)
In Connection.php line 420:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'webtrees.wt_user' doesn't exist

@dsfgorski

Copy link
Copy Markdown

It seems like command war run from wrong directory as after changing dir to /opt/webtrees it runs smoothly.

@github-actions
github-actions Bot deleted the fix/webtrees-cli-setup branch June 3, 2026 09:17
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

refactor update script A change that updates a script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Webtrees] Use webtrees cli for initial setup

4 participants