{"repo":"Dexerto/on-demand-revalidation","free":true,"listed":false,"github":"https://github.com/Dexerto/on-demand-revalidation","clone":"git clone https://github.com/Dexerto/on-demand-revalidation.git","description":"Next.js On-Demand Revalidation for Wordpress on the post update revalidates specific paths.","language":"PHP","stars":22,"topics":["nextjs","on-demand","plugin","revalidation","ssg","wordpress","wordpress-plugin"],"license":"GPL-3.0","category":"deployment-docker-iac","readme_excerpt":"On-Demand Revalidation Next.js On-Demand Revalidation for Wordpress on the post update, revalidate specific paths on the post update. Installation Pages Router - In your Next.js project add new file /pages/api/revalidate.ts with this code: App Router (with tags support) - In your Next.js project add new file /app/api/revalidate/route.ts with this code: - Add REVALIDATE SECRET KEY env variable to your Next.js with Revalidate Secret Key value you added in the Plugin Settings. --- Local Development Prerequisites - Docker (or OrbStack / Colima) - DDEV v1.23+ Getting Started 1. Clone the repository to your local machine. 2. From the project root, run: On first run DDEV will build the web/db containers, download WordPress into ./wordpress/ (gitignored), symlink this plugin into wp-content/plugins/plugin-dev , create the wp-config.php , install WordPress, and register the product / service custom post types via an mu-plugin. composer install also runs automatically. 3. Open the site with ddev launch (opens https://on-demand-revalidation.ddev.site ) and sign in at /wp-admin with admin / password . To reset WordPress state (drop the DB, recreate the config, and re-run the bootstrap) without rebuilding containers: Development Environment DDEV provides: - WordPress (latest, installed into ./wordpress/ on first start) - PHP 8.2 with Xdebug (toggle with ddev xdebug on / ddev xdebug off ) - MariaDB 10.11 - Node.js 20.x and npm - WP-CLI ( ddev wp … ) - Composer ( ddev composer … ) Useful UR","default_branch":null,"files":null,"tree":[],"storefront":"/r/Dexerto","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Dexerto/on-demand-revalidation/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}