تفصیل
Headless Deploy Panel for Vercel is for sites that use WordPress as a headless CMS with a front end hosted on Vercel.
- Deploy: start a new deployment with one click, using a Vercel deploy hook.
- Monitor: see your latest deployments and their state, updated while a deployment is running.
- Revalidate: a "Revalidate page” button on posts and pages asks your Next.js site to refresh that page (on-demand revalidation), without a full deployment.
Your Vercel API token, deploy hook and revalidation secret are stored on your server and are only used by WordPress itself. They are never sent to the browser.
This plugin is not affiliated with or endorsed by Vercel Inc.
Inspired by Vercel Deploy for Strapi.
External services
This plugin connects to the following services. Nothing is sent until an administrator saves the settings, and then only when the actions below happen.
Vercel REST API
Used to list the latest deployments of your Vercel account or team.
- What is sent: your API token (as an
Authorizationheader) and, if set, the project name and team ID. - When: when an administrator opens the Deploy Panel page, and every few seconds while a deployment started from that page is running.
- Endpoint:
https://api.vercel.com/v6/deployments
Vercel deploy hook
Used to start a new deployment of your project.
- What is sent: an empty
POSTrequest to the deploy hook URL you entered (https://api.vercel.com/v1/integrations/deploy/...). - When: only when an administrator clicks Deploy.
Both services are provided by Vercel Inc.: Terms of Service, Privacy Policy.
Your site’s revalidation URL
Used for on-demand revalidation of your own front end, at the URL you entered in the settings. This is usually your own Next.js site; if it is hosted on Vercel, the Vercel terms and privacy policy above apply.
- What is sent: the path and post type of the post, and the revalidation secret (as an
x-revalidate-secretheader) if you set one. - When: only when a user clicks Revalidate page on a published post.
اسکرین شاٹس




انسٹالیشن
- Install and activate the plugin from Plugins Add New, or upload the
headless-deploy-panel-for-vercelfolder to/wp-content/plugins/. - In Vercel, create a deploy hook for your project and an access token.
- Go to Deploy Panel Settings, paste the deploy hook URL and the token, and save.
- Optionally fill in the project name and team ID to only list that project’s deployments.
- Go to Deploy Panel and click Deploy.
Only administrators (users who can manage options) can see deployments and start them. Anyone who can edit a post can revalidate it.
عمومی سوالات
-
Which settings do I need?
-
The deploy hook URL and an API token are required for the deployments page. Project name and team ID are optional filters. The revalidation URL is only needed for the "Revalidate page” button.
-
How do I find my team ID?
-
Open your team in the Vercel dashboard and go to Settings General. You can use the team ID or the team slug.
-
How does revalidation work?
-
When an editor clicks Revalidate page, WordPress sends a
GETrequest to your revalidation URL with two query parameters:path: the path of the post, for example/about/team/post_type: the post type, for examplepage
If you set a revalidation secret, it is sent in the
x-revalidate-secretheader. Only published content can be revalidated. -
Can you show an example Next.js route?
-
For the App Router, create
app/api/revalidate/route.js:import { revalidatePath } from "next/cache" export async function GET(request) { if (request.headers.get("x-revalidate-secret") !== process.env.REVALIDATE_SECRET) { return Response.json({ message: "Invalid secret" }, { status: 401 }) } const path = request.nextUrl.searchParams.get("path") if (!path) { return Response.json({ message: "Missing path" }, { status: 400 }) } revalidatePath(path) return Response.json({ revalidated: true, path }) }Set
REVALIDATE_SECRETin your Vercel project to the same value as the plugin’s "Revalidation secret” setting, then usehttps://your-site.com/api/revalidateas the revalidation URL. -
Can I show the revalidate box on custom post types?
-
Yes, with the
headless_deploy_panel_meta_box_post_typesfilter:add_filter( 'headless_deploy_panel_meta_box_post_types', function ( $post_types ) { $post_types[] = 'product'; return $post_types; } ); -
Where is the source code?
-
On GitHub. Issues and pull requests are welcome.
جائزے
There are no reviews for this plugin.
شراکت دار اور ڈیویلپرز
“Headless Deploy Panel for Vercel” اوپن سورس سافٹ ویئر ہے۔ مندرجہ ذیل لوگوں نے اس پلگ ان میں حصہ لیا:
شراکت دار“Headless Deploy Panel for Vercel” کا اپنی زبان میں ترجمہ کریں۔
ڈویلپمینٹ میں دلچسپی ہے؟
کوڈ براؤز کریں، ایس این وی ریپوزیٹری کو چیک کریں یا ڈویلپمینٹ لاگ کو سبسکرائب کریں بذریعہ آر ایس ایس۔
چینج لاگ
1.2.1
- The GitHub repository is now github.com/eeeurico/headless-deploy-panel-for-vercel, to match the new name.
1.2.0
- Renamed from "Deploy to Vercel” to "Headless Deploy Panel for Vercel”, as requested by the WordPress.org Plugins Team. The admin menu is now called "Deploy Panel”.
- Changed: the settings option is now
headless_deploy_panel_settings. Settings from earlier versions are migrated automatically. - Changed: the meta box filter is now
headless_deploy_panel_meta_box_post_types.
1.1.0
- Security: the API token and deploy hook are no longer sent to the browser. All requests to Vercel are made by WordPress through new REST endpoints.
- Security: secret settings are shown as password fields and are never displayed again after saving.
- New: optional revalidation secret, sent in the
x-revalidate-secretheader. - New: "Settings” link on the Plugins screen.
- Improved: the revalidation path is worked out on the server from the post, and only published content can be revalidated.
- Improved: after clicking Deploy, the page waits for the new deployment to appear and finish.
- Improved: scripts and styles only load on the plugin page and on edit screens that show the revalidate box.
- Improved: the admin interface is translatable, including the JavaScript.
- Changed: settings are stored in the
deploy_vercel_settingsoption. Settings from 1.0.x are migrated automatically. - Changed: the meta box filter
VDWP/meta_box/post_typesis nowdeploy_vercel_meta_box_post_types. - Requires WordPress 6.0 and PHP 7.4.
1.0.4
- Add "Revalidate” meta box to posts and pages for on-demand revalidation of a Next.js front end.
- Add Revalidation URL setting.
1.0.3
- Changes recommended by the WordPress Plugin Directory team.
1.0.2
- Rename the plugin as recommended by the WordPress Plugin Directory team.
1.0.0
- First release.
