Skip to content

Commit b917711

Browse files
WP Toolkit: update WordPress version references to 7.0 (released May 20 2026)
1 parent a888c71 commit b917711

3 files changed

Lines changed: 33 additions & 10 deletions

File tree

panel/routes/wp_toolkit.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,21 @@ def _detect_webserver():
8282
return 'caddy'
8383
return 'nginx' # default
8484

85+
def _installed_webservers():
86+
"""Return list of actually installed webservers."""
87+
installed = []
88+
if shutil.which('nginx'):
89+
installed.append('nginx')
90+
if shutil.which('apache2') or shutil.which('httpd'):
91+
installed.append('apache')
92+
if os.path.exists('/usr/local/lsws/bin/lshttpd'):
93+
installed.append('openlitespeed')
94+
if shutil.which('caddy'):
95+
installed.append('caddy')
96+
if not installed:
97+
installed.append('nginx') # assume nginx as fallback
98+
return installed
99+
85100
def _php_sock(ver):
86101
"""Return the PHP-FPM socket path for a given version."""
87102
for sock in [
@@ -602,6 +617,7 @@ def list_sites():
602617
'ok': True,
603618
'sites': sites,
604619
'webservers': ['nginx', 'apache', 'openlitespeed', 'caddy'],
620+
'installed_webservers': _installed_webservers(),
605621
'php_versions': _available_php(),
606622
'db_engines': _available_db(),
607623
'wpcli_installed': _wp_installed(),

web/static/js/app.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ function wpPage() {
411411
sites: [], loading: false, scanning: false,
412412
wpcliInstalled: false, activeWebserver: 'nginx',
413413
phpVersions: [], dbEngines: [], wpVersions: [],
414+
installedWebservers: ['nginx'],
414415
searchQ: '', filterTab: 'all',
415416
showInstall: false, installing: false, installResult: null,
416417
installLog: '',
@@ -436,6 +437,7 @@ function wpPage() {
436437
this.sites = r.sites || [];
437438
this.wpcliInstalled = r.wpcli_installed;
438439
this.activeWebserver = r.active_webserver || 'nginx';
440+
this.installedWebservers = r.installed_webservers || [r.active_webserver || 'nginx'];
439441
this.phpVersions = (r.php_versions || []).map(v => v.version);
440442
this.dbEngines = r.db_engines || ['mysql','mariadb'];
441443
if (this.installForm.php_version === '8.4' && this.phpVersions.length)

web/templates/index.html

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,8 @@
936936
</div>
937937

938938
<!-- ═══ SITE DETAIL DRAWER ═══ -->
939-
<div x-show="drawer.show" @click.self="drawer.show=false"
940-
style="position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:100;display:flex;align-items:stretch;justify-content:flex-end">
939+
<div x-show="drawer.show" @click.self="drawer.show=false" class="modal-overlay"
940+
style="z-index:100;align-items:stretch;justify-content:flex-end">
941941
<div style="width:700px;background:var(--bg-card);height:100%;display:flex;flex-direction:column;overflow:hidden;box-shadow:-4px 0 24px rgba(0,0,0,.2)">
942942

943943
<!-- Drawer header -->
@@ -1288,8 +1288,7 @@
12881288
</div>
12891289

12901290
<!-- ═══ INSTALL MODAL ═══ -->
1291-
<div x-show="showInstall" @click.self="showInstall=false"
1292-
style="position:fixed;inset:0;background:rgba(0,0,0,.6);z-index:200;display:flex;align-items:center;justify-content:center">
1291+
<div x-show="showInstall" @click.self="showInstall=false" class="modal-overlay" style="z-index:200">
12931292
<div style="background:var(--bg-card);border-radius:12px;width:580px;max-height:88vh;overflow-y:auto;border:1px solid var(--border);box-shadow:var(--shadow-lg)">
12941293
<!-- Modal header -->
12951294
<div style="padding:16px 20px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;background:var(--bg-card);z-index:1">
@@ -1357,11 +1356,16 @@
13571356
<div class="form-group">
13581357
<label class="form-label">Web server</label>
13591358
<select class="form-input" x-model="installForm.webserver">
1360-
<option value="nginx">Nginx</option>
1361-
<option value="apache">Apache</option>
1362-
<option value="openlitespeed">OpenLiteSpeed</option>
1363-
<option value="caddy">Caddy</option>
1359+
<option value="nginx" x-text="installedWebservers.includes('nginx')?'Nginx ✓ installed':'Nginx (not installed)'"></option>
1360+
<option value="apache" x-text="installedWebservers.includes('apache')?'Apache ✓ installed':'Apache (not installed)'"></option>
1361+
<option value="openlitespeed" x-text="installedWebservers.includes('openlitespeed')?'OpenLiteSpeed ✓ installed':'OpenLiteSpeed (not installed)'"></option>
1362+
<option value="caddy" x-text="installedWebservers.includes('caddy')?'Caddy ✓ installed':'Caddy (not installed)'"></option>
13641363
</select>
1364+
<div x-show="!installedWebservers.includes(installForm.webserver)"
1365+
style="margin-top:5px;padding:7px 10px;background:rgba(245,158,11,.1);border:1px solid rgba(245,158,11,.25);border-radius:var(--radius);font-size:11px;color:#92400e">
1366+
<strong x-text="installForm.webserver"></strong> is not installed on this server.
1367+
Install it first from the <strong>App Store</strong>, then return here to install WordPress.
1368+
</div>
13651369
</div>
13661370
<div class="form-group">
13671371
<label class="form-label">Site title</label>
@@ -1434,9 +1438,10 @@
14341438
</div>
14351439
<div style="display:flex;gap:8px">
14361440
<button class="btn btn-ghost" @click="showInstall=false">Cancel</button>
1437-
<button class="btn btn-primary" :disabled="installing" @click="runInstall()">
1441+
<button class="btn btn-primary" :disabled="installing || !installedWebservers.includes(installForm.webserver)" @click="runInstall()">
14381442
<span x-show="installing">Installing…</span>
1439-
<span x-show="!installing">Install WordPress</span>
1443+
<span x-show="!installing && !installedWebservers.includes(installForm.webserver)">Install webserver first</span>
1444+
<span x-show="!installing && installedWebservers.includes(installForm.webserver)">Install WordPress</span>
14401445
</button>
14411446
</div>
14421447
</div>

0 commit comments

Comments
 (0)