Is it possible to "Update" pages via SQL?
How can I update a page in WordPress using MySQL? I.e., effectively click the update button in the page editor using MySQL? But not make any changes to the page?
What I'm doing: I'm making some bulk changes in wp_postmeta using a MySQL query in PHPMyAdmin, i.e. Woocommerce product data. I've discovered that each page needs to be manually Updated in the page editor for the product data to appear correctly on the front end. Once I make the changes in wp_postmeta, and then wp_update_post resave each page, the data appears correctly.
How can I resave or Update a number of pages, by each post_id, via MySQL so I don't ave to manually save each page? Would I use wp_update_post
? https://developer.wordpress.org/reference/functions/wp_update_post/
I don't need to use Ajax; this concerns ~100 pages and the server is fast, so an SQL query won't timeout.
Topic wp-update-post Wordpress
Category Web