Hardcopy
Hardcopy turns a WordPress site into clean static HTML you can host anywhere. WordPress stays your private editing site; visitors get plain files from a CDN, object store or any web server. It reads the finished pages exactly as a visitor sees them, so Bricks, Bricksforge and any other builder or plugin renders the same way it does today.
It is a standalone plugin, not a Bricks add-on, and it is not on sale yet.
Requires WordPress 6.0 and PHP 8.0. Developed and tested on this site with Bricks 2.4 and Rank Math. See “What has and has not been tested” below before relying on a feature.
Why it exists
A WordPress site needs updates, plugins and a database that attackers can reach. A static copy has none of that on the public side: no logins to guess, no PHP to exploit and very little to slow down. Hardcopy builds that copy and keeps it up to date, and it carries over the things that normally break in a static export: SEO output, languages, redirects and forms.
Install
- Go to Plugins, Add New, Upload Plugin, choose the zip and select Install Now, then Activate.
- Open Tools, Hardcopy.
- On the General tab set the Production domain, the public address the static site will live at. Hardcopy rewrites links, canonicals and the sitemap to it.
- Choose how the files should leave the site on the Delivery tab. A ZIP archive is on by default.
- On the Export tab select Run export.
What gets exported
Pages, posts and every other public post type are exported by default, along with category archives and paginated pages such as /blog/page/2/. Tag archives are off until you switch them on. Media pages (attachments) can be included too; on most sites WordPress redirects them to the parent post, and Hardcopy then writes a redirect rule instead of a duplicate page.
Theme and plugin CSS, scripts, images and fonts are copied alongside the pages and their links are rewritten. Folders that are only referenced from scripts can be listed under Extra asset folders. A 404 page is generated, along with sitemap.xml, robots.txt and llms.txt, each of which can be switched off.
The output is tidied as it is written: WordPress head clutter is removed, Cloudflare email obfuscation is decoded back to real addresses, and a Google Analytics 4 tag can be added if you give it a measurement ID.
SEO plugins and languages
Hardcopy detects the SEO plugin you use and follows what it outputs rather than guessing. Adapters exist for Rank Math, Yoast SEO, All in One SEO and SEOPress, with a plain fallback when none is active. Titles, descriptions, canonicals, schema, social tags, per-page noindex and the plugin’s own redirect manager come through. The sitemap is built from the pages that were actually exported, so a noindexed page never appears in it.
A site-wide noindex on the working copy, which is normal for a staging site, is not copied into the output. A noindex on a single page, whether it comes from your SEO plugin or a Bricks page setting, is kept. The Global noindex handling setting changes this.
Polylang and WPML are detected automatically. Each language is exported at its own address and hreflang tags are added where the plugin has not already printed them. Check the SEO & languages tab to see which adapters were found, or run wp hardcopy adapters.
Forms
A static site cannot process a form by itself, so Hardcopy keeps WordPress as a small private form handler. It supports Bricks forms and Bricksforge forms. On the static pages a short script sends the submission to a REST endpoint on the WordPress site, which runs the email action exactly as configured in the builder, including the recipient you set on the form.
- Allowed origins. Only the production domain (and any extra origins you list) may submit.
- Signed form tokens. Each form carries a token created at export time. A forged or outdated form is refused.
- Spam checks. A hidden honeypot field, a minimum time before submitting, a per-address hourly limit, and optional Cloudflare Turnstile or hCaptcha.
- A log and a retry queue. Every submission is stored for the number of days you choose. If an email cannot be sent it is queued and retried, and
wp hardcopy retry-formsruns the queue by hand. A fallback recipient can be set on the Forms tab.
The working copy must be able to send email. If the server has no mail transport, install an SMTP plugin; otherwise submissions are logged as failed and wait in the retry queue.
Delivery
Turn on any number of targets on the Delivery tab. Each export runs through them in turn and reports the result of each.
- ZIP archive in the uploads folder. A new archive is only made when something changed.
- Local folder, either synced in place or written as numbered releases, with a limit on how many to keep.
- FTP, FTPS and SFTP.
- S3-compatible storage, including Cloudflare R2, with a configurable Cache-Control header.
- Deploy hook, a URL called after the files are ready, for hosts that build from a repository or trigger their own deploy.
Incremental builds
The first export renders every page. After that Hardcopy only renders what changed. Each page has a signature made from its content, its page-builder data, its SEO fields and anything that affects the whole site, such as the theme, active plugins, menus, global Bricks styles and the export settings. If the signature has not changed the page is skipped and its file is left untouched. Category and tag archives rebuild when a post in that term changes. Pages that list other content, such as a Bricks query loop or a latest posts block, are rebuilt whenever any exported content changes, because their output depends on it. An export with nothing to do renders nothing and keeps the existing ZIP.
Edits made straight in the database or with WP-CLI are picked up as well as edits made in the editor. Updating the plugin, or changing the theme, menus or the list of active plugins, rebuilds everything once. Full mode always rebuilds all of it.
Renders ask page caches to step aside, so a cached copy of an old page is never exported.
Checks and rollback
After an export Hardcopy opens its own output and checks it. Errors are things that will hurt visitors or search engines: failed pages, broken internal links, missing assets, an accidental site-wide noindex. Warnings and notes point at details worth a look, such as a canonical that points at another address or a link to a page that is not in the export. Run it again at any time with wp hardcopy verify.
Delivery stops if pages failed, unless you tick Deliver even if some pages failed. With the local folder target in releases mode, wp hardcopy rollback switches the live folder back to the previous release instantly.
Redirects
Redirects from your SEO plugin or the Redirection plugin, and any address WordPress redirects while rendering, can be written as a _redirects file for Netlify and Cloudflare Pages, as .htaccess rules for Apache, or both. The setting is on the SEO & languages tab and is off by default. The checker warns you if redirects exist and the setting is off.
WP-CLI
wp hardcopy exportruns an export. Add--mode=full,--targets=s3,hookor--background.wp hardcopy statusshows the last export.wp hardcopy verifyprints the check results.wp hardcopy rollbackswitches a local folder in releases mode back to the previous release.wp hardcopy targetstests the connection to each configured delivery target.wp hardcopy retry-formsretries form emails that failed.wp hardcopy adaptersshows the SEO and language adapters in use.
Exports can also run in the background from the admin screen, using Action Scheduler when it is installed and WordPress cron otherwise. If cron is disabled on the server, run the queue from a real cron job or use WP-CLI.
What has and has not been tested
Tested on this site, which runs Bricks 2.4 and Rank Math: full and incremental exports of about 480 pages, pagination, category and tag archives, attachment redirects, Cloudflare email decoding, the checker, the ZIP target, the forms bridge guards (origin, token, timing, honeypot) and form submissions reaching the bridge.
Not yet tested on a live site: WPML, Polylang with real translations, the Yoast, All in One SEO and SEOPress adapters beyond automated tests, FTP and SFTP delivery, S3 and R2 delivery, the captcha providers, MySQL as opposed to MariaDB, signed update packages, and form email delivery from a server with working mail.
Data and privacy
- Settings are stored in one option. Form submissions are kept in one database table for the retention period you choose, then deleted.
- FTP, SFTP and S3 credentials are stored on the working copy. Keep that site private and use credentials limited to the target folder or bucket.
- Exports are built by requesting your own pages. Hardcopy contacts no outside service except the delivery targets and captcha provider you turn on, and the update server if you set one.
- Deleting the plugin removes its settings and form table. Exported files and ZIPs in the uploads folder are left for you to delete.