Documentation
Everything you need to install, configure, and master WP Static Runtime.
🚀 Getting Started
Requirements
- WordPress 6.4 or higher
- PHP 8.0 or higher
- Apache (with
mod_rewrite) or Nginx - Write permission on
wp-content/cache/wp-static-runtime/
Installation
- Download the plugin zip from statixpress.site or WordPress.org.
- In your WordPress admin, go to Plugins → Add New → Upload Plugin.
- Select the downloaded
.zipfile and click Install Now. - Click Activate Plugin.
- Go to WP Static Runtime → Settings and enable the cache.
- Visit any page on your site — it will now be cached as a static HTML file on first load.
Verify It's Working
Open any page and inspect the HTML source. You should see a comment at the bottom:
<!-- WP Static Runtime | Cached: 2025-01-01 10:00:00 -->
You can also check WP Static Runtime → Diagnostic for a full system check.
Persyaratan
- WordPress 6.4 atau lebih baru
- PHP 8.0 atau lebih baru
- Apache (dengan
mod_rewrite) atau Nginx - Izin tulis pada folder
wp-content/cache/wp-static-runtime/
Instalasi
- Download file zip plugin dari statixpress.site atau WordPress.org.
- Di WordPress admin, buka Plugins → Add New → Upload Plugin.
- Pilih file
.zipyang sudah didownload, klik Install Now. - Klik Activate Plugin.
- Buka WP Static Runtime → Settings dan aktifkan cache.
- Kunjungi halaman mana saja di situs Anda — halaman tersebut akan di-cache sebagai file HTML statis saat pertama kali dimuat.
Verifikasi Plugin Aktif
Buka halaman mana saja dan lihat source HTML-nya. Anda akan melihat komentar di bagian bawah:
<!-- WP Static Runtime | Cached: 2025-01-01 10:00:00 -->
Anda juga bisa cek WP Static Runtime → Diagnostic untuk pemeriksaan sistem lengkap.
⚙️ Configuration
All settings are under WP Static Runtime → Settings in your WordPress admin.
| Setting | Description | Default |
|---|---|---|
| Enable Static Cache | Master switch. Turn off to disable all caching without deactivating the plugin. | Off |
| Cache Lifetime | How long a cached file is considered fresh (in hours). After expiry, the next request regenerates the file. | 24h |
| HTML Minification | Removes unnecessary whitespace and comments from cached HTML to reduce file size. | On |
| Gzip Compression | Stores a pre-compressed .gz copy alongside each cached file for servers that support gzip passthrough. | On |
| Exclude URLs | One URL per line. Supports exact paths (/cart) and wildcards (/user/*). These pages are never cached. | — |
| Exclude Cookies | If a visitor has any of these cookies, they receive the dynamic (non-cached) version. | woocommerce_* |
| Mobile Separate Cache | Serve a separate cache file for mobile visitors (useful if your theme renders differently on mobile). | Off |
Semua pengaturan ada di WP Static Runtime → Settings di WordPress admin Anda.
| Pengaturan | Keterangan | Default |
|---|---|---|
| Enable Static Cache | Tombol utama. Matikan untuk menonaktifkan semua cache tanpa menonaktifkan plugin. | Mati |
| Cache Lifetime | Berapa lama file cache dianggap masih segar (dalam jam). Setelah kadaluarsa, permintaan berikutnya akan meregenerasi file. | 24 jam |
| HTML Minification | Menghapus spasi dan komentar yang tidak diperlukan dari HTML yang di-cache untuk mengurangi ukuran file. | Aktif |
| Gzip Compression | Menyimpan salinan .gz yang sudah dikompres di samping setiap file cache untuk server yang mendukung gzip passthrough. | Aktif |
| Exclude URLs | Satu URL per baris. Mendukung path eksak (/cart) dan wildcard (/user/*). Halaman-halaman ini tidak pernah di-cache. | — |
| Exclude Cookies | Jika pengunjung memiliki salah satu cookie ini, mereka akan mendapatkan versi dinamis (bukan cache). | woocommerce_* |
| Mobile Separate Cache | Sajikan file cache terpisah untuk pengunjung mobile (berguna jika tema Anda merender berbeda di mobile). | Mati |
🕷️ Crawler
The built-in crawler discovers all published URLs from the WordPress database and generates static cache files for them. No sitemap.xml required.
Running the Crawler Manually
- Go to WP Static Runtime → Crawler.
- Click Start Crawl. The crawler will queue all published posts, pages, archives, and taxonomy pages.
- Progress is shown in real time. Each URL is visited and cached.
- When complete, your entire site is pre-warmed — zero cold-start for visitors.
Auto-Crawler Cron (Premium)
Premium users can enable an hourly scheduled crawl that keeps all pages fresh automatically. Configure the interval under Settings → Crawler → Cron Interval.
Crawler bawaan menemukan semua URL yang dipublikasikan dari database WordPress dan membuat file cache statis untuk semuanya. Tidak memerlukan sitemap.xml.
Menjalankan Crawler Secara Manual
- Buka WP Static Runtime → Crawler.
- Klik Start Crawl. Crawler akan mengantrekan semua post, halaman, arsip, dan halaman taksonomi yang dipublikasikan.
- Progress ditampilkan secara real time. Setiap URL dikunjungi dan di-cache.
- Setelah selesai, seluruh situs Anda sudah pre-warm — tidak ada cold-start untuk pengunjung.
Auto-Crawler Cron (Premium)
Pengguna premium dapat mengaktifkan crawl terjadwal setiap jam yang menjaga semua halaman tetap segar secara otomatis. Konfigurasi intervalnya di Settings → Crawler → Cron Interval.
🛒 WooCommerce
WP Static Runtime supports WooCommerce out of the box with Hybrid Mode: product and shop pages are served as static HTML, while cart, checkout, and account pages remain fully dynamic.
| Page Type | Mode | Reason |
|---|---|---|
| Shop, Category, Product | Static | Read-only, cacheable |
| Cart, Checkout | Dynamic | Session-dependent, changes per user |
| My Account | Dynamic | Logged-in user content |
| Order Received (thank you) | Dynamic | Per-order content |
Stock Update Cache Clearing
When a product's stock changes (e.g., after a purchase), the plugin automatically clears the cache for that product page and its parent category page.
WP Static Runtime mendukung WooCommerce secara langsung dengan Hybrid Mode: halaman produk dan toko disajikan sebagai HTML statis, sementara cart, checkout, dan halaman akun tetap dinamis.
| Tipe Halaman | Mode | Alasan |
|---|---|---|
| Toko, Kategori, Produk | Statis | Konten tetap, bisa di-cache |
| Keranjang, Checkout | Dinamis | Bergantung sesi, berbeda per pengguna |
| My Account | Dinamis | Konten untuk pengguna yang login |
| Terima Kasih (Order) | Dinamis | Konten per pesanan |
Cache Clearing Saat Stok Berubah
Ketika stok produk berubah (misalnya setelah pembelian), plugin secara otomatis menghapus cache untuk halaman produk tersebut dan halaman kategori induknya.
📐 Server Rules
The plugin generates server configuration rules that tell your web server to serve static files directly — bypassing PHP entirely.
Apache (.htaccess)
The plugin auto-writes the necessary rules to your .htaccess file on activation. No manual action needed. If you need to regenerate them, go to Settings → Server Rules → Regenerate.
# WP Static Runtime - Apache Rules
RewriteEngine On
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{HTTP_COOKIE} !(wordpress_logged_in|woocommerce_cart) [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/wp-static-runtime/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/wp-static-runtime/$1/index.html [L]Nginx
For Nginx, go to Settings → Server Rules and copy the Nginx snippet. Add it inside your server {} block:
location / {
set $cache_file "$document_root/wp-content/cache/wp-static-runtime${uri}index.html";
if ($request_method = GET) {
if ($query_string = "") {
if ($http_cookie !~ "wordpress_logged_in|woocommerce_cart") {
try_files $cache_file $uri $uri/ /index.php?$args;
}
}
}
}.htaccess.
Plugin ini membuat aturan konfigurasi server yang memberi tahu web server Anda untuk menyajikan file statis secara langsung — melewati PHP sepenuhnya.
Apache (.htaccess)
Plugin secara otomatis menulis aturan yang diperlukan ke file .htaccess Anda saat aktivasi. Tidak diperlukan tindakan manual. Jika Anda perlu meregenerasinya, buka Settings → Server Rules → Regenerate.
# WP Static Runtime - Apache Rules
RewriteEngine On
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} ^$
RewriteCond %{HTTP_COOKIE} !(wordpress_logged_in|woocommerce_cart) [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/wp-static-runtime/$1/index.html -f
RewriteRule ^(.*) /wp-content/cache/wp-static-runtime/$1/index.html [L]Nginx
Untuk Nginx, buka Settings → Server Rules dan salin snippet Nginx-nya. Tambahkan di dalam blok server {} Anda:
location / {
set $cache_file "$document_root/wp-content/cache/wp-static-runtime${uri}index.html";
if ($request_method = GET) {
if ($query_string = "") {
if ($http_cookie !~ "wordpress_logged_in|woocommerce_cart") {
try_files $cache_file $uri $uri/ /index.php?$args;
}
}
}
}.htaccess.
♻️ Incremental Static Regeneration (ISR)
ISR brings the stale-while-revalidate pattern to WordPress. When a cached page expires, the next visitor is served the stale (old) version instantly while the fresh version is regenerated in the background. Zero downtime. Zero blank screens.
How It Works
- A visitor requests a page whose cache has expired.
- They receive the stale cached version immediately (fast response).
- A background job regenerates the page by fetching it via loopback request.
- The next visitor receives the fresh version.
Configuration
| Option | Description |
|---|---|
| ISR Revalidation Interval | How often expired pages are regenerated (in minutes). Recommended: 30–60 min. |
| Max Queue Size | Maximum pages to regenerate per cron run. Default: 20. |
| Priority Post Types | Post types that are regenerated first (e.g., post, product). |
ISR membawa pola stale-while-revalidate ke WordPress. Saat halaman yang di-cache kadaluarsa, pengunjung berikutnya mendapatkan versi lama (stale) secara instan sementara versi baru diregenerasi di latar belakang. Tanpa downtime. Tanpa layar kosong.
Cara Kerja
- Pengunjung meminta halaman yang cache-nya sudah kadaluarsa.
- Mereka langsung mendapatkan versi cache lama (respon cepat).
- Sebuah job background meregenerasi halaman dengan mengambilnya via loopback request.
- Pengunjung berikutnya mendapatkan versi terbaru.
Konfigurasi
| Opsi | Keterangan |
|---|---|
| ISR Revalidation Interval | Seberapa sering halaman yang kadaluarsa diregenerasi (dalam menit). Rekomendasi: 30–60 menit. |
| Max Queue Size | Maksimal halaman yang diregenerasi per siklus cron. Default: 20. |
| Priority Post Types | Tipe post yang diregenerasi pertama kali (misalnya post, product). |
🌍 CDN Integration
When you update a post, the plugin automatically purges the corresponding URL from your CDN so visitors never see stale content. Supports Cloudflare, BunnyCDN, and Fastly.
Cloudflare
- Go to Premium Settings → CDN → Cloudflare.
- Enter your Zone ID (found in Cloudflare Dashboard → Overview).
- Enter your API Token with Cache Purge permission.
- Save. From now on, every post update triggers an automatic Cloudflare purge.
BunnyCDN
- Go to Premium Settings → CDN → BunnyCDN.
- Enter your Pull Zone ID and API Key from the BunnyCDN dashboard.
- Save and test with the Test Purge button.
Fastly
- Go to Premium Settings → CDN → Fastly.
- Enter your Service ID and API Token.
- Save. Purge is triggered via surrogate keys on post update.
Saat Anda memperbarui sebuah post, plugin secara otomatis menghapus (purge) URL yang sesuai dari CDN Anda agar pengunjung tidak pernah melihat konten yang sudah kadaluarsa. Mendukung Cloudflare, BunnyCDN, dan Fastly.
Cloudflare
- Buka Premium Settings → CDN → Cloudflare.
- Masukkan Zone ID Anda (tersedia di Cloudflare Dashboard → Overview).
- Masukkan API Token dengan izin Cache Purge.
- Simpan. Mulai sekarang, setiap pembaruan post memicu purge Cloudflare otomatis.
BunnyCDN
- Buka Premium Settings → CDN → BunnyCDN.
- Masukkan Pull Zone ID dan API Key dari dashboard BunnyCDN.
- Simpan dan uji dengan tombol Test Purge.
Fastly
- Buka Premium Settings → CDN → Fastly.
- Masukkan Service ID dan API Token Anda.
- Simpan. Purge dipicu via surrogate keys saat post diperbarui.
🔑 License & Activation
After purchasing a premium plan, you will receive a license key by email.
Activating Your License
- In WordPress admin, go to WP Static Runtime → Premium → License.
- Paste your license key and click Activate.
- The plugin verifies the key with the license server and enables premium features.
Deactivating / Transferring
To move your license to a different site, first deactivate it on the current site (License → Deactivate), then activate it on the new site. Personal plan: 1 active domain. Agency plan: unlimited.
License Not Found?
If you purchased and didn't receive a license key within 10 minutes, check your spam folder or contact us.
Setelah membeli paket premium, Anda akan menerima license key melalui email.
Mengaktifkan Lisensi
- Di WordPress admin, buka WP Static Runtime → Premium → License.
- Tempel license key Anda dan klik Activate.
- Plugin memverifikasi key dengan license server dan mengaktifkan fitur premium.
Menonaktifkan / Memindahkan Lisensi
Untuk memindahkan lisensi ke situs lain, nonaktifkan dulu di situs saat ini (License → Deactivate), lalu aktifkan di situs baru. Paket Personal: 1 domain aktif. Paket Agency: tak terbatas.
License Key Tidak Diterima?
Jika Anda sudah membeli tetapi tidak menerima license key dalam 10 menit, cek folder spam atau hubungi kami.
🔧 Troubleshooting
Cache is not being served
Check that the server rules are active: go to Diagnostic → Server Rules. For Apache, ensure mod_rewrite is enabled and AllowOverride All is set. For Nginx, ensure you have added the snippet to your server block and reloaded Nginx.
Pages show "Page Not Found" after enabling
Your WordPress permalink settings may need to be saved. Go to Settings → Permalinks and click Save Changes without changing anything.
Admin bar or logged-in elements show in cached pages
The plugin automatically excludes logged-in users from seeing cached pages. If you are seeing admin elements in the cache, add the wordpress_logged_in cookie to your exclusion list.
WooCommerce cart is empty or not updating
Cart and checkout pages should never be cached. Verify they appear in the auto-excluded URLs list under Settings → Exclusions.
Cache files are not being created
Check that the wp-content/cache/wp-static-runtime/ directory is writable by the web server. Run WP Static Runtime → Diagnostic to confirm permissions.
Plugin slows down after a post update
On post update, the plugin clears the cache for that page plus related archives. If your site has many related pages, this can cause a brief slowdown. Consider enabling ISR (Premium) to avoid this.
Cache tidak disajikan
Cek apakah server rules sudah aktif: buka Diagnostic → Server Rules. Untuk Apache, pastikan mod_rewrite aktif dan AllowOverride All sudah diset. Untuk Nginx, pastikan Anda sudah menambahkan snippet ke server block dan reload Nginx.
Halaman menampilkan "Page Not Found" setelah diaktifkan
Pengaturan permalink WordPress mungkin perlu disimpan ulang. Buka Settings → Permalinks dan klik Save Changes tanpa mengubah apa pun.
Admin bar atau elemen login muncul di halaman cache
Plugin secara otomatis mengecualikan pengguna yang login dari melihat halaman cache. Jika Anda melihat elemen admin di cache, tambahkan cookie wordpress_logged_in ke daftar pengecualian.
Keranjang WooCommerce kosong atau tidak terupdate
Halaman cart dan checkout tidak boleh pernah di-cache. Verifikasi bahwa keduanya muncul di daftar URL yang dikecualikan otomatis di Settings → Exclusions.
File cache tidak dibuat
Pastikan folder wp-content/cache/wp-static-runtime/ dapat ditulis oleh web server. Jalankan WP Static Runtime → Diagnostic untuk mengonfirmasi izin.
Plugin melambat setelah pembaruan post
Saat post diperbarui, plugin menghapus cache untuk halaman tersebut beserta arsip terkait. Jika situs Anda memiliki banyak halaman terkait, ini dapat menyebabkan perlambatan singkat. Pertimbangkan mengaktifkan ISR (Premium) untuk menghindari ini.