Have you seen wpshell? It’s a command line tool for wordpress. Basically, it’s a WordPress environment that lets you run arbitrary php – so you could set up a WP_Query
that pulls all posts, loop through them, and fire that command on each one.
Sort of what I had in mind, untested. Using wp_update_post()
as it contains the save_post
hook, and is the equivalent of hitting ‘update’ on the post edit screen:
$args = array('posts_per_page' => -1, 'post_type' => 'any')
$query = new Wp_query($args)
while ( $query->have_posts() ) : $query->the_post();
$post->wp_update_post();
echo $post->ID . '<br />';
endwhile;
echo 'Done! Everything saved!';
Related Posts:
- Programmatically save one/any post
- Java Package Does Not Exist Error
- Where does the Media Library live in the database?
- How to import wordpress posts with images from one wordpress site to another?
- Failed to import Media
- What is the required format for importing posts into WordPress?
- update_post_meta and update_field ony working when saving the post
- WordPress Theme Options Import/Export
- How to add featured thumbnail into import XML?
- One Click demo content installation feature in WordPress theme options panel
- How to re-Import the WordPress XML file after editing?
- Migrating WP site to another URL
- Import old SQL dump into new WordPress version
- Why shouldn’t @import be used to import a parent theme into a child theme?
- Import a very old WordPress Version into new WordPress
- WXR import problem — not including categories
- Moving a blog from Tumblr to WordPress
- Download/View Schema (or DTD) for XML Import
- Using the Importer on an IIS Server
- How to import a TypePad blog including all media?
- Returning ACF custom field from publish_post
- Easy way to import a post from Word?
- Convert WordPress.com embed links to normal embeds
- Scrape data from a website and post it on the blog
- Importing custom post types using WordPress Importer, how to check for meta field values
- Is there a way to import Blogger into bbPress?
- WXR slicing script
- can’t import xml file
- WP CLI not importing media files
- Error: Failed to import tag/post
- Update Attached Image Size after Import
- Exporting and Importing WordPress Media Libraries and Galleries
- Custom Taxonomy terms aren’t getting referenced or saved in Quick Edit or Bulk Edit, only on Single product page?
- WordPress does not import all pages and post
- How to add more names in Baby Name Page?
- Troubles with acf/save_post and WP_Query
- Batch attach unattached images
- How to access my wordpress via IP in shared hosting
- A question on WXR
- Problems with WordPress Import
- What is basic structure of xml for importing a page in wordpress?
- How to import content from WordPress.com to a self hosted WordPress installation?
- keep two blogs under the same domain
- In What WordPress Version Was the Import/Export Tool Introduced?
- Moving WordPress site to an existing WordPress site
- Website goes down while importing backup (Internal server 500)
- WordPress WXR import – importing a large file
- Import HTML/JS post to WordPress?
- After imorting posts from another blog double line breaks have been replaced with single line breaks
- Export Users From Live Site to Import onto staging
- Help using acf/save_post hook to connect to Untappd API and update_field [closed]
- How to add biography of user while importing?
- How to import XML to WordPress as post and custom fields?
- Programatticaly Import Pages while Maintaining Hierarchy
- How to export a WordPress blog with no export function?
- Importing posts via MySql (a csv file) need to be automatically published
- Is there a way to show different source feeds on individual pages?
- Exporting by table
- automated import from blogger
- Error in importing wordpress xml [closed]
- How to import media from folder as opposed from old site?
- CSV Import Tables
- Import function loses tags
- WordPress Import (CLI) returns Error Establishing a database connection
- WordPress xml import too slow
- Import WordPress content to my website
- Existing posts hidden after WP import
- Importing a Google Group to bbPress
- Import large database in php my admin
- Request failed due to an error: (http_request_fail
- After importing items are not displaying
- How to import posts correctly?
- Upload advanced custom field text link array with csv
- import svg-files from wxr – (upload works, import not)
- WordPress All-Import to ATUM Stock Management
- Mixed Content: The page at ” was loaded over HTTPS, but requested an insecure font ”
- How can I import a BlogML file into my WordPress site?
- How to import several big Import XMLs?
- How to make bulk changes to wordpress posts
- Pull specific data from CSV
- save_post affect creation and deletion
- XML file import for attachments or featured images
- XML importing fails
- When migrating all backslashes were stripped and special signs are converted in html entities
- WP_Query within save_post doesn’t include the item that triggered the action?
- Import xml feed
- Importing many times to succeed
- Function that get ACF fields value before saving
- Create CSV for import from File directories?
- Export and import all Plugin options
- Import data from file larger than 15 MB
- How to import individual blog posts into WordPress?
- Import post from Tumblr to WordPress [duplicate]
- Syndicate posts to another blog?
- Astra Site is not importing
- WXR? Export from Drupal 7 – import into WordPress
- WordPress Export/Import for custom options.php values?
- WP-all-import problems with large input file [closed]
- How to create import option for xml
- How to add featured thumbnail into import XML using URL image?