Releases: seriocomic/cp-static-deploy
Release list
v1.0.3 - Database-based Change Detection
What's Fixed
- Resolves HTTP 404 errors when plugin tries to access REST API
- Server can now detect changes even when it can't access its own hostname via HTTP
Changes
- ✅ Switch primary change detection to direct database queries
- ✅ Query
wp_poststable for posts/pages modified after last build - ✅ Maintains REST API method as automatic fallback
- ✅ Improves reliability on systems with complex Apache vhost configurations
Technical Details
- Uses
$wpdb->get_results()with prepared statements for security - Converts results to permalinks using
get_permalink() - Automatic fallback ensures compatibility with various setups
- Zero external HTTP dependencies for core functionality
Verified Working
✅ Successfully detected 1 changed post via database
✅ Selective build completed (4 URLs rebuilt)
✅ Git operations and PR creation working
✅ PR #11 created and deployed
Why This Change?
The previous REST API approach failed when the server couldn't access its own hostname (dev.seriocomic.com) due to Apache vhost configuration. This database-first approach bypasses HTTP entirely, making the plugin more reliable regardless of web server configuration.
Installation
Already deployed to production server. Plugin will automatically use database method.
Rollback
If issues occur, the plugin automatically falls back to REST API method.
v1.0.2 - REST API modified_after Support
What's New
- Added REST API support for
modified_afterquery parameter - Fixes change detection via WordPress API
- Enables selective builds based on modification dates
Changes
- Register custom
rest_post_queryandrest_page_queryfilters - Convert
modified_afterparameter to WP_Querydate_query - Validate ISO 8601 date format (YYYY-MM-DDTHH:MM:SS)
Fixes
- Resolves HTTP 404 errors when querying
/wp-json/wp/v2/posts?modified_after=... - Plugin can now properly detect changed content since last build
Installation
Deploy to server using:
./deploy.shv1.0.1
Bug Fix
- Fix RSS feed not updating on selective builds — The post-processing pipeline ran HTML URL rewriting before feed conversion. Since wget saves the RSS feed as
feed/index.html, the HTML rewriter corrupted the XML (stripping newlines, mangling self-closing tags), causingsimplexml_load_string()to silently fail and noall.rssto be generated. Reordered pipeline soprocess_feeds()andclean_old_files()run immediately after mirroring, before HTML rewriting touches the files.
CP Static Deploy v1.0.0
Initial Release
First stable release of CP Static Deploy - a ClassicPress plugin for automated static site deployment.
Features
- Selective Builds - Only rebuilds changed pages using the WordPress REST API, reducing build time from ~30 minutes to ~30 seconds
- No External Dependencies - Replaces Node.js/npm/gulp/GitHub CLI with pure PHP post-processing
- Encrypted Credential Storage - GitHub token encrypted with AES-256-CBC using WordPress auth keys
- Admin Status Page - Real-time deploy status, logs, and manual trigger with AJAX polling
- Automatic Merge Conflict Resolution - Pre-syncs with production branch and auto-resolves conflicts
- Lock File Protection - Prevents concurrent deploys
- Pull Request Workflow - Creates PRs with auto-merge labels for audit trail and GitHub Actions integration
Requirements
- ClassicPress 1.0+ or WordPress 4.9+
- PHP 7.4+ with OpenSSL extension
- git and wget installed on the server
- A GitHub repository for static site output
- A system user (deploy user) with SSH key access to GitHub
- Sudo configuration allowing web server to run deploy script
Installation
See README.md for detailed installation instructions.
Privacy & Data Collection
This plugin requires explicit opt-in consent before communicating with external servers. You must manually configure a GitHub Personal Access Token to authorize GitHub API access. The plugin only contacts GitHub's API (api.github.com) to create and manage pull requests. No user data, analytics, or telemetry is collected.
Files
Download cp-static-deploy-1.0.0.zip and extract to your ClassicPress plugins directory.