{"id":158979,"date":"2022-06-20T05:07:31","date_gmt":"2022-06-20T05:07:31","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/next-js-on-demand-revalidation\/"},"modified":"2025-04-24T09:34:20","modified_gmt":"2025-04-24T09:34:20","slug":"on-demand-revalidation","status":"publish","type":"plugin","link":"https:\/\/pcd.wordpress.org\/plugins\/on-demand-revalidation\/","author":21024109,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.0","stable_tag":"1.3.0","tested":"6.7.5","requires":"6.0.0","requires_php":"8.0","requires_plugins":null,"header_name":"On-Demand Revalidation","header_author":"Dexerto","header_description":"Next.js On-Demand Revalidation on the post update, revalidate specific paths on the post update.","assets_banners_color":"0073aa","last_updated":"2025-04-24 09:34:20","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/on-demand-revalidation","header_author_uri":"https:\/\/dexerto.com","rating":0,"author_block_rating":0,"active_installs":100,"downloads":6979,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","changelog"],"tags":{"1.0.10":{"tag":"1.0.10","author":"bebjakub","date":"2022-11-22 07:24:12"},"1.0.11":{"tag":"1.0.11","author":"bebjakub","date":"2022-11-22 07:30:28"},"1.0.12":{"tag":"1.0.12","author":"bebjakub","date":"2022-11-24 05:53:20"},"1.0.13":{"tag":"1.0.13","author":"bebjakub","date":"2022-11-24 05:56:27"},"1.0.14":{"tag":"1.0.14","author":"bebjakub","date":"2023-01-20 12:36:39"},"1.0.15":{"tag":"1.0.15","author":"bebjakub","date":"2023-01-20 12:39:42"},"1.0.16":{"tag":"1.0.16","author":"bebjakub","date":"2023-02-10 06:23:40"},"1.0.2":{"tag":"1.0.2","author":"bebjakub","date":"2022-06-20 05:07:28"},"1.0.3":{"tag":"1.0.3","author":"bebjakub","date":"2022-06-20 05:21:48"},"1.0.4":{"tag":"1.0.4","author":"bebjakub","date":"2022-06-20 05:30:42"},"1.0.5":{"tag":"1.0.5","author":"bebjakub","date":"2022-06-20 05:35:39"},"1.0.6":{"tag":"1.0.6","author":"bebjakub","date":"2022-07-28 18:01:19"},"1.0.7":{"tag":"1.0.7","author":"bebjakub","date":"2022-10-14 05:58:08"},"1.0.8":{"tag":"1.0.8","author":"bebjakub","date":"2022-10-17 05:45:59"},"1.0.9":{"tag":"1.0.9","author":"bebjakub","date":"2022-11-05 10:18:07"},"1.1.0":{"tag":"1.1.0","author":"bebjakub","date":"2023-06-06 14:23:13"},"1.1.1":{"tag":"1.1.1","author":"bebjakub","date":"2023-06-07 05:17:12"},"1.1.2":{"tag":"1.1.2","author":"bebjakub","date":"2023-06-20 13:27:22"},"1.1.3":{"tag":"1.1.3","author":"bebjakub","date":"2023-06-21 11:30:06"},"1.2.2":{"tag":"1.2.2","author":"dexerto","date":"2024-04-19 12:26:05"},"1.2.3":{"tag":"1.2.3","author":"dexerto","date":"2024-04-19 13:36:45"},"1.2.4":{"tag":"1.2.4","author":"dexerto","date":"2024-04-19 14:39:10"},"1.2.5":{"tag":"1.2.5","author":"dexerto","date":"2025-01-20 17:12:44"},"1.3.0":{"tag":"1.3.0","author":"dexerto","date":"2025-04-24 09:34:20"}},"upgrade_notice":[],"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2798656,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2798656,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2798656,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2798656,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.10","1.0.11","1.0.12","1.0.13","1.0.14","1.0.15","1.0.16","1.0.2","1.0.3","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","1.1.0","1.1.1","1.1.2","1.1.3","1.2.2","1.2.3","1.2.4","1.2.5","1.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[211409,126244,211411,211410],"plugin_category":[],"plugin_contributors":[211306],"plugin_business_model":[],"class_list":["post-158979","plugin","type-plugin","status-publish","hentry","plugin_tags-nextjs","plugin_tags-on-demand","plugin_tags-revalidation","plugin_tags-ssg","plugin_contributors-bebjakub","plugin_committers-bebjakub","plugin_committers-dexerto"],"banners":{"banner":"https:\/\/ps.w.org\/on-demand-revalidation\/assets\/banner-772x250.png?rev=2798656","banner_2x":"https:\/\/ps.w.org\/on-demand-revalidation\/assets\/banner-1544x500.png?rev=2798656","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/on-demand-revalidation\/assets\/icon-128x128.png?rev=2798656","icon_2x":"https:\/\/ps.w.org\/on-demand-revalidation\/assets\/icon-256x256.png?rev=2798656","generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>Next.js On-Demand Revalidation for Wordpress on post updates, revalidate specific paths and tags on post updates.<\/p>\n\n<p>Feel free to create a PR to <a href=\"https:\/\/github.com\/Dexerto\/on-demand-revalidation\">plugin Github repo<\/a>.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Search for the plugin in WordPress under \"Plugins -&gt; Add New\".<\/li>\n<li>Click the \u201cInstall Now\u201d button, followed by \"Activate\".<\/li>\n<li>Add Next.js URL and Revalidate Secret Key in the Settings -&gt; Next.js On-Demand Revalidation<\/li>\n<li>In your Next.js project add a new file <code>\/pages\/api\/revalidate.ts<\/code> or <code>\/app\/api\/revalidate\/route.ts<\/code> with a code snippet, you'll find <a href=\"https:\/\/github.com\/Dexerto\/on-demand-revalidation\">here<\/a>.<\/li>\n<li>Add <code>REVALIDATE_SECRET_KEY<\/code> env variable to your Next.js with Revalidate Secret Key value you added in the Plugin Settings.<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.3.0<\/h4>\n\n<ul>\n<li>feat: Add ability to provide custom paths and tags per post type from @MuhammedAO<\/li>\n<li>fix: prevent locales from being loaded too early @humet<\/li>\n<\/ul>\n\n<h4>1.2.5<\/h4>\n\n<ul>\n<li>feat: prevent revalidate functions from running more than once within a single save_post request from @MuhammedAO<\/li>\n<li>fix: tags array populated by paths filter from @cavemon<\/li>\n<li>fix: paths array empty if <code>revalidate_paths<\/code> is not defined from @cavemon<\/li>\n<li>fix: better error handling from @humet<\/li>\n<\/ul>\n\n<h4>1.2.4<\/h4>\n\n<ul>\n<li>fix: do not send non-replaced string if term is not there<\/li>\n<\/ul>\n\n<h4>1.2.3<\/h4>\n\n<ul>\n<li>fix: Rename database id placeholder<\/li>\n<li>fix: Remove unwanted default placeholders<\/li>\n<li>fix: Do not send items if empty<\/li>\n<\/ul>\n\n<h4>1.2.2<\/h4>\n\n<ul>\n<li>feat: Added the rewrite_placeholders function to dynamically replace placeholders like <code>%slug%<\/code>, <code>%id%<\/code>, <code>%categories%<\/code>, and <code>%tags%<\/code> with actual post data from @MuhammedAO<\/li>\n<\/ul>\n\n<h4>1.2.1<\/h4>\n\n<ul>\n<li>fix: renamed filenames to match PSR-4 compliance  from @MuhammedAO<\/li>\n<\/ul>\n\n<h4>1.2.0<\/h4>\n\n<ul>\n<li>feat: Allow tags and paths to be sent to the revalidation API to support <code>revalidateTags<\/code> and <code>revalidatePaths<\/code> independently from @MuhammedAO<\/li>\n<\/ul>\n\n<h4>1.1.3<\/h4>\n\n<ul>\n<li>fix: Add old permalink tracking to revalidation process from @humet<\/li>\n<\/ul>\n\n<h4>1.1.2<\/h4>\n\n<ul>\n<li>fix: reduce unnecessary revalidations from @humet<\/li>\n<\/ul>\n\n<h4>1.1.1<\/h4>\n\n<ul>\n<li>Allow custom taxonomies revalidation from @humet<\/li>\n<\/ul>\n\n<h4>1.0.16<\/h4>\n\n<ul>\n<li>fix from @slimzc<\/li>\n<\/ul>\n\n<h4>1.0.15<\/h4>\n\n<ul>\n<li>Add postId to revalidation request<\/li>\n<\/ul>\n\n<h4>1.0.13<\/h4>\n\n<ul>\n<li>Add Disable scheduled revalidation option<\/li>\n<\/ul>\n\n<h4>1.0.11<\/h4>\n\n<ul>\n<li>Connect with Cloudflare purge cache plugin<\/li>\n<\/ul>\n\n<h4>1.0.9<\/h4>\n\n<ul>\n<li>Update readme, minors. Thank you @gibix!<\/li>\n<\/ul>\n\n<h4>1.0.8<\/h4>\n\n<ul>\n<li>Fix: ensure correct deep paths for posts. Thank you @pressoholics!<\/li>\n<\/ul>\n\n<h4>1.0.7<\/h4>\n\n<ul>\n<li>Fix: address conflicts with wpgraphql plugin. Thank you @pressoholics!<\/li>\n<\/ul>\n\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>add filter on_demand_revalidation_paths<\/li>\n<\/ul>","raw_excerpt":"Next.js On-Demand Revalidation for Wordpress on post updates, revalidate specific paths and tags on post updates.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/158979","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=158979"}],"author":[{"embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/dexerto"}],"wp:attachment":[{"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=158979"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=158979"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=158979"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=158979"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=158979"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pcd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=158979"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}