Linux 软件免费装
Banner图

HTML Page Publisher

开发者 hosseinkarami
更新时间 2026年8月29日 02:23
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

html ai landing page static html claude design

下载

1.2.1 1.5.0 1.0.0 1.1.0 1.2.0

详情介绍:

HTML Page Publisher lets you drop a standalone HTML file into WordPress and have it served as a landing page at a clean URL such as https://example.com/pages/your-slug/. No theme changes, no FTP, no page builder. It is built for the "I made this page with an AI tool, now how do I get it onto my site?" moment. It includes purpose-built cleanup for Claude Design exports, and works with any self-contained HTML page — from ChatGPT, Gemini, or written by hand. (Tools that export React or Vite projects, such as v0 and Bolt, first need to be built or exported to static HTML.) Key features Use cases HTML Page Publisher is an independent project. It is not affiliated with, endorsed by, or sponsored by Anthropic, OpenAI, Google, Vercel, or StackBlitz. Claude, ChatGPT, Gemini, v0 and Bolt are trademarks of their respective owners.

安装:

  1. Upload the html-page-publisher folder to /wp-content/plugins/ (or install from Plugins → Add New).
  2. Activate the plugin from the Plugins screen.
  3. Go to HTML Pages in the admin sidebar to upload your first page.
  4. (Optional) Visit HTML Pages → Settings to change the URL prefix, configure a subdomain, or check storage protection.

屏幕截图:

  • Edit a published page in the dashboard with the native WordPress code editor.
  • Files & Assets: every file of an imported bundle — images, CSS, JS, fonts — with replace and delete in place.
  • Settings: URL prefix, optional subdomain, global snippets, and a live check that storage protection is active.
  • Page settings: draft/published, custom path or front page, noindex, rename and duplicate.

升级注意事项:

1.5.0 Your pages keep their URLs. Coming from 1.2.x: replacing an existing page now needs an explicit checkbox, links into the uploads folder redirect to the page URL, and pages gain a canonical link (Settings). Adds ZIP bundles, drafts, custom paths, analytics snippets, sitemap and a REST API. 1.4.0 ZIP bundles, drafts with preview links, custom paths and front-page mapping, global analytics snippets, sitemap/noindex, rename and duplicate. Existing pages keep their URLs. 1.3.0 Storage folders are now protected from direct access, pages get real caching headers and a canonical URL. Existing pages keep their URLs. One behaviour change: re-uploading to an existing slug now requires ticking a Replace checkbox instead of overwriting silently. 1.2.0 Edit published pages and manage their images right in the dashboard, with version history and one-click restore. Fully backward-compatible.

常见问题:

Can I upload a whole folder (CSS, JS, images) at once?

Yes. Zip the exported folder — index.html at the top level (or inside a single folder), assets in subfolders — and upload the .zip instead of an .html file. Files keep their relative paths, so css/site.css and img/hero.png references work unchanged. Executable files (.php etc.), anything outside the allowed types, and any file containing PHP code are skipped and reported. ZIP import needs PHP's ZipArchive extension, which nearly every host provides; if yours does not, upload the HTML and its files separately.

How do drafts and previews work?

Tick Save as draft when uploading a new page, or switch a page to Draft in its Page Settings. Drafts return a 404 to visitors and search engines; administrators can view them, and the Preview button gives you a link with a secret token you can share with anyone (use Reset preview link to revoke it). Publish from Page Settings when you are happy.

Can I serve a page at the site root or a custom path?

Yes. In a page's settings, set Custom path to promo to serve it at https://example.com/promo/, or to / to make it the front page. If you later change the path, the old one redirects to the page. Paths that belong to existing WordPress pages or posts, core routes, category/tag/author bases and post-type archives are refused; other rewrite rules (e.g. from other plugins) are not checked, so choose a path you know is free. The front page keeps working for WordPress's own query-string routes (search, previews, REST, feeds).

How do I add Google Analytics, GTM or a pixel to every page?

HTML Pages → Settings → Global snippets. Paste the tags into the head or footer snippet; they are inserted into every published page when it is served (so re-uploading a page never loses them). Pages can opt out individually.

Are pages in my XML sitemap?

Published pages that are not marked noindex are listed at /wp-sitemap-htmlpp-1.xml, which is linked from WordPress's built-in sitemap index. SEO plugins such as Yoast or Rank Math replace the core sitemap with their own; in that case use the htmlpp_sitemap_entries filter (or HTMLPP_Sitemap::entries()) to feed their sitemap.

Can I publish from a script, CI, or Claude Code?

Yes. The plugin exposes a REST API at /wp-json/htmlpp/v1 (list, create/replace from an HTML file or ZIP, update HTML or settings, rename, duplicate, files, versions, preview links). Authenticate with an application password (Users → Profile → Application Passwords) for an administrator: curl -u "admin:xxxx xxxx xxxx xxxx" -F slug=spring-promo -F file=@index.html https://example.com/wp-json/htmlpp/v1/pages With shell access, wp htmlpp publish spring-promo ./site.zip --overwrite does the same. The GitHub repository ships a Claude Code skill (skills/publish-to-wordpress) so Claude can publish a page it just generated.

Which AI tools does it work with?

Any tool that gives you a single, self-contained HTML file. Claude Design's "Export as standalone HTML" is supported directly, including automatic removal of the runtime wrappers it injects. Pages from ChatGPT, Gemini, or written by hand work as-is. Tools such as v0 and Bolt export React/Vite projects rather than static HTML, so you need to build or export those to plain HTML first.

Where are uploaded pages stored?

In wp-content/uploads/html-page-publisher/<slug>/. Each page has its own directory containing an index.html and an assets/ folder for images. Version-history snapshots are kept separately in wp-content/uploads/html-page-publisher-backups/<slug>/. Both folders contain an .htaccess that denies direct access, so pages are only reachable at their public URL.

I use nginx. Is my storage folder protected?

nginx ignores .htaccess. Pages still work at their public URL, but the raw files could also be fetched from the uploads folder. HTML Pages → Settings shows whether direct access is blocked and gives you a ready-made location block to add to your nginx server configuration. The same applies to Apache or LiteSpeed configured with AllowOverride None.

How do I edit a page or change its files after publishing?

Open HTML Pages, click Edit on a page. You get the native WordPress code editor for the HTML, a Version History panel to restore earlier saves, and a Files & Assets panel to add, replace, or delete the page's images, CSS, JS, fonts and other files without re-uploading the HTML. Use Replace (rather than uploading a new file) to swap a file while keeping the same name, so existing references in your HTML keep working.

What happens if I upload a slug that already exists?

The upload is refused with a message explaining why, unless you tick Replace the existing page. With the box ticked the new HTML replaces the live page and the previous version is saved to the page's version history. Automated workflows can allow overwrites with the htmlpp_allow_overwrite filter.

Can I lock down editing?

Yes. The standard DISALLOW_FILE_EDIT (or DISALLOW_FILE_MODS) constant in wp-config.php disables in-dashboard HTML editing, file changes, renaming and replacing existing pages, the same way it disables WordPress's core file editor. Uploading new pages, duplicating and deleting remain available.

How do I use the subdomain feature?

Two steps:

  1. DNS: Add an A or CNAME record pointing your subdomain (e.g. sales.yourdomain.com) at the same server as your WordPress site.
  2. Web server: Configure your hosting to serve that subdomain from the same WordPress install. On shared hosting with cPanel this is typically an "addon domain" or "subdomain" option. On managed hosts, you may need to request it from support.
Then enter the hostname in HTML Pages → Settings → Subdomain. Pages will be served at https://sales.yourdomain.com/your-slug/ in addition to the regular prefix URL.

Is it safe to upload arbitrary HTML?

Only users with the manage_options capability (administrators by default) can upload pages. Uploaded HTML is served as-is, including any <script> tags it contains, so only upload HTML you trust.

Will uninstalling delete my pages?

No. Uninstalling removes the plugin's settings but leaves the uploaded pages in wp-content/uploads/html-page-publisher/ (and their version-history snapshots in wp-content/uploads/html-page-publisher-backups/) intact, together with their metadata (draft status, custom paths, redirects) so a reinstall does not publish former drafts. Delete those folders and the htmlpp_pages, htmlpp_redirects and htmlpp_path_redirects options manually if you want everything gone.

Does this work with caching plugins or a CDN?

Yes. Pages are served before WordPress's main query runs, with ETag and Last-Modified headers; conditional requests get a 304 Not Modified and HEAD requests are supported. The page HTML is sent with max-age=0, must-revalidate so edits show immediately; assets get one hour. To let a CDN cache the HTML itself, use the htmlpp_cache_max_age filter: add_filter( 'htmlpp_cache_max_age', function ( $seconds, $file, $ext, $is_page ) { return $is_page ? 600 : $seconds; }, 10, 4 );

Can I add cleanup rules for another export format?

Yes. Rules are a named array of PCRE pattern/replacement pairs: add_filter( 'htmlpp_sanitizer_rules', function ( $rules, $slug, $context ) { $rules['my-tool-banner'] = array( 'pattern' => '/<div class="made-with">.*?<\/div>/is', 'replacement' => '' ); return $rules; }, 10, 3 ); You can also unset() a built-in rule by its key (for example claude-design-cfasync-script) if it interferes with your markup.

更新日志:

1.5.0 1.4.0 1.3.0 1.2.1 1.2.0 1.1.0 1.0.0