You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+77-6Lines changed: 77 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,29 @@
1
1
# WPStatic
2
2
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.
4
4
5
5
## Description
6
6
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
+
8
27
9
28
The admin screen provides the following capabilities:
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'.**
31
50
2. Activate the plugin from the **Installed Plugins** screen.
32
51
3. Open **WPStatic** from the WordPress admin menu.
33
52
4. Click **Generate/Export Static Site** and wait for completion.
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).
52
71
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
+
53
78
## Advanced Opt-In Options
54
79
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?**
56
97
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.
59
110
60
111
## Changelog
61
112
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
+
62
133
### 1.0.2
63
134
-**Fix:** Uninstall flow now reliably loads required helper functions before cleanup.
64
135
-**Improvement:** Kept uninstall cleanup logic centralized by reusing existing helper APIs instead of duplicating cleanup behavior.
0 commit comments