You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Automatically revalidate your Next.js site when WordPress content changes.
12
+
13
+
== Description ==
14
+
15
+
Next.js Revalidation is a WordPress plugin designed to work with the `next-wp` Next.js starter template. It triggers revalidation of your Next.js site's cache whenever content is added, updated, or deleted in WordPress.
16
+
17
+
The plugin sends webhooks to your Next.js site's revalidation API endpoint, ensuring your headless frontend always displays the most up-to-date content.
18
+
19
+
**Key Features:**
20
+
21
+
* Automatic revalidation when posts, pages, categories, tags, authors, or media are modified
22
+
* Settings page to configure your Next.js site URL and webhook secret
23
+
* Manual revalidation option for full site refresh
24
+
* Support for custom post types and taxonomies
25
+
* Optional admin notifications for revalidation events
26
+
27
+
== Installation ==
28
+
29
+
1. Upload the `next-revalidate` folder to the `/wp-content/plugins/` directory
30
+
2. Activate the plugin through the 'Plugins' menu in WordPress
31
+
3. Go to Settings > Next.js Revalidation to configure your Next.js site URL and webhook secret
32
+
33
+
== Configuration ==
34
+
35
+
1. Visit Settings > Next.js Revalidation in your WordPress admin
36
+
2. Enter your Next.js site URL without a trailing slash (e.g., https://your-site.com)
37
+
3. Enter the webhook secret which should match the WORDPRESS_WEBHOOK_SECRET in your Next.js environment
38
+
4. Optionally enable admin notifications for revalidation events
39
+
5. Click "Save Settings"
40
+
41
+
== Frequently Asked Questions ==
42
+
43
+
= What is the webhook secret for? =
44
+
45
+
The webhook secret provides security for your revalidation API endpoint. It ensures that only your WordPress site can trigger revalidations.
46
+
47
+
= How do I set up my Next.js site for revalidation? =
48
+
49
+
Your Next.js site needs an API endpoint at `/api/revalidate` that can process the webhook payloads from this plugin.
50
+
See the README in your Next.js project for more details.
51
+
52
+
= Does this work with custom post types? =
53
+
54
+
Yes, the plugin automatically detects and handles revalidation for custom post types and taxonomies.
55
+
56
+
== Changelog ==
57
+
58
+
= 1.0.0 =
59
+
* Initial release
60
+
61
+
== Upgrade Notice ==
62
+
63
+
= 1.0.0 =
64
+
Initial release of the Next.js Revalidation plugin.
0 commit comments