WordPress action hook · part of WordPress core

save_post

A WordPress core action that 62 plugins also fire themselves, running on 2M+ sites between them.

“This action is documented in wp-includes/post.php.”

How to use save_post

It's an action: your callback runs at that point and receives 3 arguments. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'save_post', function( $ID, $post, $arg3 ) {
	// Your code runs here.
}, 10, 3 );

Argument names come from Page Builder by SiteOrigin's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

This hook is fired by WordPress core too. Official reference on developer.wordpress.org →

62 plugins that fire save_post

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Smart Slider 3 icon Smart Slider 3800,000+ installs do_action( 'save_post', $postID, $post, true ) Nextend/SmartSlider3/Application/Helper/HelperSliderChanged.php:105
  2. Web Accessibility (formally known as Ally) icon Web Accessibility (formally known as Ally)500,000+ installs do_action( 'save_post', $entry_id, $post, true ) modules/remediation/classes/utils.php:176
  3. Page Builder by SiteOrigin icon Page Builder by SiteOrigin400,000+ installs do_action( 'save_post', $post->ID, $post, true ) inc/admin.php:1279
  4. WP All Import icon WP All Import100,000+ installs do_action( 'save_post', $pid, $post_object, $is_update ) models/import/record.php:4195
  5. Optimization Detective icon Optimization Detective50,000+ installs do_action( 'save_post', $post->ID, $post, true ) detection.php:315
  6. User Profile Builder icon User Profile Builder40,000+ installs do_action( 'save_post', $this->id, $post, false ) assets/lib/class-mustache-templates/class-mustache-templates.php:461
  7. BEAR icon BEAR30,000+ installs do_action( 'save_post', $product_id, $pp, true ) classes/models/products.php:856
  8. Editorial Calendar icon Editorial Calendar20,000+ installs do_action( 'save_post', $edcal_postid, $post, true ) edcal.php:1355
  9. Royal MCP icon Royal MCP10,000+ installs do_action( 'save_post', $post_id, $post, true ) includes/MCP/Support/Post_Write_Hooks.php:58
  10. Bulky icon Bulky10,000+ installs do_action( 'save_post', $product_id, $pp, true ) admin/ajax.php:414
  11. Bulk Edit Products for WooCommerce icon Bulk Edit Products for WooCommerce10,000+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  12. Estatik Real Estate Plugin icon Estatik Real Estate Plugin10,000+ installs do_action( 'save_post', $listing_id, $property->get_wp_entity(), true ) includes/classes/class-plugin-migration.php:360
  13. PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes icon PublishPress Revisions: Duplicate Posts, Submit, Approve and Schedule Content Changes10,000+ installs do_action( 'save_post', $published->ID, $_published, true ) admin/revision-action_rvy.php:1315
  14. Bulk Edit Posts and Products in Spreadsheet icon Bulk Edit Posts and Products in Spreadsheet7,000+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  15. Admin Management Xtended icon Admin Management Xtended5,000+ installs do_action( 'save_post', $postid, $post, true ) general-functions.php:179
  16. WOLF icon WOLF4,000+ installs do_action( 'save_post', $post_id, $pp, true ) classes/models/posts.php:371
  17. Bulk Edit Categories and Tags icon Bulk Edit Categories and Tags3,000+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  18. Property Hive icon Property Hive3,000+ installs do_action( 'save_post', $new_post_id, $post, false ) includes/class-ph-duplicate-post.php:48
  19. WPGatsby icon WPGatsby3,000+ installs do_action( 'save_post', $post->ID, $post, true ) src/ActionMonitor/Monitors/PreviewMonitor.php:81
  20. Seamless Donations is Sunset icon Seamless Donations is Sunset2,000+ installs do_action( 'save_post', $post_ID, $post, $update ) inc/utilities.php:1794
  21. Houzez Property Feed icon Houzez Property Feed1,000+ installs do_action( 'save_post', $property_post_id, get_post($property_post_id), false ) includes/class-houzez-property-feed-process.php:247
  22. Bulk Edit and Create User Profiles icon Bulk Edit and Create User Profiles1,000+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  23. BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor icon BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor1,000+ installs do_action( 'save_post', $saved_id, $post_obj, true ) front-end/products/brikpanel-product-editor.php:10706
  24. Expiring Posts icon Expiring Posts1,000+ installs do_action( 'save_post', $post->ID, $post, true ) expiring-posts.php:411
  25. BjornTech PayPal POS integration for WooCommerce icon BjornTech PayPal POS integration for WooCommerce600+ installs do_action( 'save_post', $id, $post, true ) includes/izettle-integration-product-handler.php:175
  26. FlexStock icon FlexStock600+ installs do_action( 'save_post', $post_id, $post, $update ) includes/helper/functions.php:1875
  27. Bulk Edit Coupons for WooCommerce icon Bulk Edit Coupons for WooCommerce500+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  28. BjornTech Fortnox Hub for WooCommerce icon BjornTech Fortnox Hub for WooCommerce300+ installs do_action( 'save_post', $parent_id, $post, true ) includes/class-woo-fortnox-hub-fn-product-handler.php:863
  29. Web Directory plugin Free icon Web Directory plugin Free300+ installs do_action( 'save_post', $post_id, $post, true ) core/classes/listings/listing_form_assets.php:890
  30. WPMelon Advanced Bulk Edit for WooCommerce icon WPMelon Advanced Bulk Edit for WooCommerce300+ installs do_action( 'save_post', $post->ID, $post, true ) includes/Handlers/WP_Save_Hooks_Handler.php:257
  31. MEGA AI icon MEGA AI200+ installs do_action( 'save_post', $post_id, $post_after, true ) mega.php:8894
  32. Easy Language icon Easy Language100+ installs do_action( 'save_post', $post->ID, $post, true ) app/Parser/BoldBuilder.php:246
  33. Bulk Edit Events icon Bulk Edit Events100+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  34. Bulk Edit Easy Digital Downloads icon Bulk Edit Easy Digital Downloads80+ installs do_action( 'save_post', $post_id, get_post( $post_id ), true ) modules/wp-sheet-editor/inc/api/helpers.php:946
  35. AI Translator for Polylang icon AI Translator for Polylang60+ installs do_action( 'save_post', $newId, $newPost, false ) includes/class-polylai-translator-translator.php:676
  36. ExploreXR icon ExploreXR60+ installs do_action( 'save_post', $model_id, $model, false ) admin/pages/edit-model-page.php:805
  37. AI Translate: Free AI Translation, You Pick the Model icon AI Translate: Free AI Translation, You Pick the Model50+ installs do_action_ref_array( 'save_post', array($post_id, $cb, true) ) includes/cache-invalidation.php:51
  38. Depublish Posts icon Depublish Posts30+ installs do_action( 'save_post', $post->ID, $post, true ) src/Post.php:93
  39. CM Business Directory icon CM Business Directory30+ installs do_action( 'save_post' ) backend/cm-business-directory-backend.php:61
  40. CBIAStudio BlogFlow with AI icon CBIAStudio BlogFlow with AI20+ installs do_action( 'save_post', $post_id, get_post($post_id), true ) includes/integrations/yoast-legacy.php:152
  41. Post ID Optimizer icon Post ID Optimizer10+ installs do_action( 'save_post', $post_ID, $post, $update ) post-poidopt.php:3957
  42. Fundrizer Lite icon Fundrizer Lite10+ installs do_action( 'save_post', $post_id, get_post($post_id), false ) src/Setup.php:160
  43. Dynamic Functionalities icon Dynamic Functionalities10+ installs do_action( 'save_post', $post_id, $after, true ) includes/features/class-link-health-editor.php:240
  44. ProRank SEO icon ProRank SEO10+ installs do_action( 'save_post', $id, $after, true ) includes/Core/Content/PostContentWriter.php:78
  45. Stream Manager icon Stream Manager10+ installs do_action( 'save_post', $post->ID, $post, true ) includes/class-stream-manager-manager.php:95
  46. DOT icon DOT10+ installs do_action( 'save_post', $post->ID, $post, true ) includes/class-dot-press-admin-data.php:206
  47. WPLink icon WPLink10+ installs do_action( 'save_post', $this->post_id, $post, true ) includes/class-wplink-bricks-handler.php:547
  48. ElizaWP icon ElizaWPFewer than 10 installs do_action( 'save_post', $post_id, $post, false ) inc/class-rest-meta.php:73
  49. CRAI Content Updater icon CRAI Content UpdaterFewer than 10 installs do_action( 'save_post', $original_id, $updated_post, true ) includes/class-crai-updater.php:1367
  50. Super Speedy Imports Lite icon Super Speedy Imports LiteFewer than 10 installs do_action( 'save_post', $post_id, $post, (bool)$is_update ) import-template-abstract.php:4421
  51. Workeera icon WorkeeraFewer than 10 installs do_action( 'save_post', $job_id, $post_obj, true ) includes/user-dashboard/job-posting.php:1318
  52. Your SEO Squad icon Your SEO SquadFewer than 10 installs do_action( 'save_post', $id, $post, true ) your-seo-squad.php:1708
  53. PerfLocale icon PerfLocaleFewer than 10 installs do_action( 'save_post', $post_id, $after, true ) src/Translation/PostSlugCheck.php:143
  54. Promo Revert icon Promo RevertFewer than 10 installs do_action( 'save_post', $page_id, $after, true ) includes/class-campaigns.php:858
  55. CatalogFAQ icon CatalogFAQFewer than 10 installs do_action( 'save_post', $id, $updated, true ) src/Core.php:407
  56. Zeopilot icon ZeopilotFewer than 10 installs do_action( 'save_post', $id, $post, true ) conditional-content.php:196
  57. MATUQO Media Importer icon MATUQO Media ImporterFewer than 10 installs do_action( 'save_post', $id, $new, true ) includes/import.php:242
  58. Quick Variable Products icon Quick Variable ProductsFewer than 10 installs do_action( 'save_post', $product_id, $post, (bool) $update ) includes/class-qvp-product.php:499
  59. aiModelka icon aiModelkaFewer than 10 installs do_action( 'save_post', $product_id, $post, true ) src/Media/class-product-caches.php:61
  60. WingPilot icon WingPilotFewer than 10 installs do_action( 'save_post', $post_id, $post, true ) includes/class-cache-purger.php:62
  61. show.fm Podcast Player icon show.fm Podcast PlayerFewer than 10 installs do_action( 'save_post', $post->ID, $updated, true ) includes/class-migration-swap.php:167
  62. IPS Order Media Cleanup icon IPS Order Media CleanupFewer than 10 installs do_action( 'save_post', $object_id, $post, true ) includes/classes/Media/Recovery/ReferenceJournal.php:65

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.