Skip to content

Commit f56da8c

Browse files
Release version 1.1.0
1 parent 36d21fb commit f56da8c

14 files changed

Lines changed: 1231 additions & 84 deletions

README.md

Lines changed: 77 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,29 @@
11
# WPStatic
22

3-
Generate a static HTML version of your WordPress website and download it as a ZIP archive.
3+
Convert your WordPress site into a blazing-fast, static HTML site and deploy anywhere — no PHP, no database, reduced attack surface in production.
44

55
## Description
66

7-
WPStatic helps you create a static copy of your WordPress website, facilitating faster content delivery and reducing the security risks on production hosting.
7+
WPStatic converts your WordPress site into a fully static HTML website — eliminating PHP, databases, and server-side dependencies from your production host. The result: faster load times, a reduced attack surface, and the freedom to deploy on any web server or CDN.
8+
9+
⚡ Benefits: Why WPStatic?
10+
11+
* 🚀 **Faster page loads:** Static websites load 3 to 5 times faster than WordPress sites by serving pre-rendered HTML without PHP execution or database queries.
12+
* 🔒 **Reduced attack surface:** Static sites have no login page, database connection, or server-side code on your production host. This eliminates primary attack vectors such as SQL injection and brute-force attacks.
13+
* 🌍 **Deploy anywhere:** Host on Cloudflare Pages, GitHub Pages, AWS S3, or any standard web server. No PHP, MySQL, or WordPress dependency is required in production.
14+
* 💰 **Lower hosting costs:** Static files can be served from free or low-cost CDN-based hosts instead of a PHP-capable server. Managed WordPress hosting typically costs $25 to $100 or more per month, while static hosting is often free or very affordable on platforms like Cloudflare Pages or Netlify, which offer unmetered bandwidth on their free tiers.
15+
* 🛠️ **Zero production maintenance:** Your live site is pure HTML. With no WordPress running in production, there are no security patches, plugin updates, or server-side dependencies to manage on your public host.
16+
* 🎛️ **Live export control:** Start, pause, resume, or abort the export from the admin screen and monitor progress in real time.
17+
* 📦 **One-click download:** The entire static site is packaged as a ZIP file, ready for extraction and upload.
18+
* 🔄 **Auto-resume on interruption:** If internet connectivity drops during export, the job resumes automatically once the connection is restored.
19+
20+
🔍 SEO Benefits
21+
22+
* 📊 **Better Core Web Vitals scores:** Static HTML loads faster, directly improving Time to First Byte (TTFB) and Largest Contentful Paint (LCP), which are metrics Google uses as ranking signals.
23+
* 🤖 **Improved crawl efficiency:** Search engine bots fetch plain HTML instantly, with no server-side rendering delay. This signals high crawl health and allows engines to index content more effectively.
24+
* ⏱️ **Higher uptime reliability:** Static files served from a CDN experience near-zero downtime, helping avoid Google ranking penalties for frequently unreachable URLs.
25+
* 🧹 **No WordPress footprint in production:** Common WordPress paths such as /wp-admin and /wp-login.php are removed from the live site, reducing spam crawling and preserving crawl budget.
26+
827

928
The admin screen provides the following capabilities:
1029

@@ -27,7 +46,7 @@ WPStatic systematically crawls website URLs, renders content, rewrites links for
2746

2847
## Installation
2948

30-
1. Upload the plugin to `wp-content/plugins/`, or install it via **WordPress Admin → Plugins → Add Plugin** and search for **WPStatic**.
49+
1. [Download the WPStatic plugin from here.](https://github.com/use-wpstatic/wpstatic/releases) Upload the plugin to the plugins folder (`wp-content/plugins/`), or install it via **WordPress Admin → Plugins → Add Plugin → Upload Plugin → Choose the downloaded ZIP → Click 'Install Now'.**
3150
2. Activate the plugin from the **Installed Plugins** screen.
3251
3. Open **WPStatic** from the WordPress admin menu.
3352
4. Click **Generate/Export Static Site** and wait for completion.
@@ -50,15 +69,67 @@ WPStatic systematically crawls website URLs, renders content, rewrites links for
5069

5170
WPStatic does **not** work with websites that generate content dynamically based on user interaction, such as e-commerce or subscription-based sites. Contact form submissions also require backend processing and will not function in a static export (support for this is on the roadmap).
5271

72+
## HTTP Basic Authentication
73+
74+
If your WordPress install is protected with HTTP Basic Auth (for example, a staging or subdomain install), enter your credentials under **WPStatic → Settings → Security** so WPStatic can authenticate during export.
75+
76+
Credentials are encrypted before storage and never exposed in logs or diagnostics output.
77+
5378
## Advanced Opt-In Options
5479

55-
Two optional flags are available (both disabled by default):
80+
WPStatic includes two optional safety/compatibility flags, both disabled by default and configurable from the **WPStatic → Settings → General** screen.
81+
82+
* **Allow insecure local HTTP fetch**
83+
Enable this only for expired, invalid, or self-signed certificate environments where same-site HTTPS fetches fail TLS verification. This turns off SSL verification only for local same-site fetches.
84+
85+
* **Prefer temporary storage above document root**
86+
Enable this only if you explicitly want WPStatic working directories outside `wp_upload_dir()`. By default, WPStatic uses WordPress uploads paths. Please note that this option works only if the intended directory is readable and writable by the web server user.
87+
88+
Both flags can also be set directly in the options table if preferred.
89+
90+
## Frequently Asked Questions
91+
92+
**Does this plugin replace my live WordPress site automatically?**
93+
94+
No. WPStatic creates a static export for you to deploy manually.
95+
96+
**Why can I not start an export?**
5697

57-
- **`wpstatic_prefer_temp_storage_above_document_root`** — Set to `true` in the options table only if you explicitly want WPStatic working directories placed outside `wp_upload_dir()`.
58-
- **`wpstatic_allow_insecure_local_http_fetch`** — Set to `true` only for local/self-signed certificate environments where same-site HTTPS fetches fail TLS verification. Disables SSL verification for local same-site fetches only.
98+
Common reasons:
99+
- Your permalink structure is set to **Plain**.
100+
- File permissions prevent writing inside the uploads/temp directories.
101+
- Another export job is currently active.
102+
103+
**Can I pause and continue later?**
104+
105+
Yes. Export jobs can be paused and resumed from the export screen.
106+
107+
**Can I download export diagnostics/logs?**
108+
109+
Yes. Logs can be downloaded using the **Download Export Log** button, and you can include system information using the **Include/Append system information** checkbox.
59110

60111
## Changelog
61112

113+
### [1.1.0] – 2026-05-13
114+
115+
#### Features
116+
- Added HTTP Basic Authentication support — WPStatic now forwards Basic Auth headers during export, enabling crawling of password-protected WordPress installs.
117+
- Introduced a Settings page in the admin interface with General and Security tabs.
118+
- Advanced opt-in flags (`wpstatic_allow_insecure_local_http_fetch` and `wpstatic_prefer_temp_storage_above_document_root`) are now configurable directly from the admin Settings page, without requiring manual database edits.
119+
120+
#### Security
121+
- HTTP Basic Auth credentials are encrypted before storage and decrypted only at runtime.
122+
- HTTP Basic Auth credentials are redacted from diagnostics output and export logs.
123+
124+
#### Improvements
125+
- Settings query now excludes transient options, improving performance and ensuring cleaner data retrieval.
126+
127+
#### Fixes
128+
- Logger now returns accurate content-length headers and preserves log content correctly in plain text responses.
129+
130+
#### Maintenance
131+
- Relicensed plugin metadata and license text to GPLv2 or later.
132+
62133
### 1.0.2
63134
- **Fix:** Uninstall flow now reliably loads required helper functions before cleanup.
64135
- **Improvement:** Kept uninstall cleanup logic centralized by reusing existing helper APIs instead of duplicating cleanup behavior.

assets/css/admin.css

Lines changed: 153 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,14 @@ body.wpstatic-admin-page .wrap {
135135
gap: 8px;
136136
}
137137

138+
.wpstatic-admin-tab-heading {
139+
display: block;
140+
margin-top: 6px;
141+
padding: 10px 12px 2px;
142+
color: #1d2327;
143+
font-weight: 700;
144+
}
145+
138146
.wpstatic-admin-tab {
139147
display: block;
140148
padding: 10px 12px;
@@ -146,6 +154,10 @@ body.wpstatic-admin-page .wrap {
146154
transition: all 0.15s ease-in-out;
147155
}
148156

157+
.wpstatic-admin-tab-heading ~ .wpstatic-admin-tab {
158+
margin-left: 20px;
159+
}
160+
149161
.wpstatic-admin-tab:hover {
150162
background: var(--wpstatic-accent-soft);
151163
border-color: #c9d9ff;
@@ -165,6 +177,146 @@ body.wpstatic-admin-page .wrap {
165177
font-size: 22px;
166178
}
167179

180+
.wpstatic-settings-card {
181+
background: #ffffff;
182+
}
183+
184+
.wpstatic-settings-form {
185+
max-width: 620px;
186+
}
187+
188+
.wpstatic-field {
189+
margin: 18px 0;
190+
}
191+
192+
.wpstatic-field label {
193+
display: block;
194+
margin-bottom: 6px;
195+
font-weight: 600;
196+
}
197+
198+
.wpstatic-field input[type="text"],
199+
.wpstatic-field input[type="password"] {
200+
width: 100%;
201+
max-width: 420px;
202+
}
203+
204+
.wpstatic-toggle-field {
205+
max-width: 620px;
206+
padding: 12px 0;
207+
}
208+
209+
.wpstatic-toggle-label {
210+
display: flex !important;
211+
align-items: center;
212+
justify-content: space-between;
213+
gap: 16px;
214+
margin-bottom: 0 !important;
215+
cursor: pointer;
216+
}
217+
218+
.wpstatic-toggle-title,
219+
.wpstatic-toggle-description {
220+
display: block;
221+
}
222+
223+
.wpstatic-toggle-title {
224+
margin-bottom: 4px;
225+
font-weight: 600;
226+
}
227+
228+
.wpstatic-toggle-description {
229+
color: #646970;
230+
font-size: 13px;
231+
font-weight: 400;
232+
line-height: 1.4;
233+
}
234+
235+
.wpstatic-toggle-label input[type="checkbox"] {
236+
position: absolute;
237+
opacity: 0;
238+
pointer-events: none;
239+
}
240+
241+
.wpstatic-toggle-switch {
242+
position: relative;
243+
flex: 0 0 auto;
244+
width: 42px;
245+
height: 24px;
246+
border-radius: 999px;
247+
background: #8c8f94;
248+
transition: background 0.15s ease;
249+
}
250+
251+
.wpstatic-toggle-switch::before {
252+
content: "";
253+
position: absolute;
254+
top: 3px;
255+
left: 3px;
256+
width: 18px;
257+
height: 18px;
258+
border-radius: 50%;
259+
background: #ffffff;
260+
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
261+
transition: transform 0.15s ease;
262+
}
263+
264+
.wpstatic-toggle-label input[type="checkbox"]:checked + .wpstatic-toggle-switch {
265+
background: var(--wpstatic-accent);
266+
}
267+
268+
.wpstatic-toggle-label input[type="checkbox"]:checked + .wpstatic-toggle-switch::before {
269+
transform: translateX(18px);
270+
}
271+
272+
.wpstatic-toggle-label input[type="checkbox"]:focus-visible + .wpstatic-toggle-switch {
273+
outline: 2px solid #2271b1;
274+
outline-offset: 2px;
275+
}
276+
277+
.wpstatic-settings-actions {
278+
margin-top: 22px;
279+
}
280+
281+
.wpstatic-settings-message {
282+
display: none;
283+
margin-top: 18px;
284+
padding: 10px 12px;
285+
border-left: 4px solid transparent;
286+
background: #f6f7f7;
287+
font-weight: 600;
288+
}
289+
290+
.wpstatic-settings-message.is-success {
291+
border-left-color: #00a32a;
292+
background: #edfaef;
293+
color: #0a5d1b;
294+
}
295+
296+
.wpstatic-settings-message.is-error {
297+
border-left-color: #d63638;
298+
background: #fcf0f1;
299+
color: #8a2424;
300+
}
301+
302+
.wpstatic-settings-export-question {
303+
margin-top: 16px;
304+
padding: 14px 16px;
305+
border: 1px solid #c3c4c7;
306+
border-radius: 6px;
307+
background: #ffffff;
308+
}
309+
310+
.wpstatic-settings-export-question p {
311+
margin: 0 0 10px;
312+
font-weight: 600;
313+
}
314+
315+
.wpstatic-settings-export-question label {
316+
display: block;
317+
margin: 8px 0;
318+
}
319+
168320
@media (max-width: 1200px) {
169321
.wpstatic-admin-sidebar {
170322
flex: 0 0 220px;
@@ -188,4 +340,4 @@ body.wpstatic-admin-page .wrap {
188340
.wpstatic-layout-sidebar-right .wpstatic-admin-main {
189341
flex-direction: column;
190342
}
191-
}
343+
}

0 commit comments

Comments
 (0)