=== Bulk Post Date Change ===
Contributors: quintaphon
Donate link: https://buymeacoffee.com/quintaphon
Tags: post date, bulk edit, modified date, schedule, randomize
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.2
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Change the published and modified dates of many posts at once: random, spread, in sequence, shifted or fixed. Preview first, undo any run.

== Description ==

Bulk Post Date Change sets new dates on as many posts, pages, products or other post types as you like, in one go. You see the exact result before anything changes, and every run can be undone.

* **Pick the posts.** Tick them in any post list and choose "Change dates" under Bulk actions, or use filters: post types, statuses, categories, tags and any other taxonomy, author, published between two dates, not modified for some days, title, a list of IDs, and "at most N posts" taking the oldest, newest, least recently modified or random ones first.
* **Published or modified.** Change the published date (and choose what the modified date does: keep it, match it, set it to now or a random moment after the new published date), or change only the modified date.
* **Six ways to set dates.** Random in a range, evenly spread across a range, one after another (one post every so many minutes, hours, days or weeks, forward or backward), shift by an amount (months and years move by the calendar), one exact date, or now.
* **Natural dates.** Only on chosen weekdays, only between chosen hours of the day, keep each post's time of day, and keep the current order so the newest post stays the newest.

= Safe =

* **Preview.** A table of old and new dates, spread over the whole list, with the number of posts that become scheduled or published. What you preview is exactly what is applied.
* **Undo.** Every run keeps the old dates, statuses and comment dates. One click in History puts them back.
* **Correct statuses.** A published post is never dated after now unless you choose to schedule it, and then it really becomes a scheduled post. A scheduled post moved into the past is published, with the usual publish hooks.
* **Sensible modified dates.** The modified date is never before the published date and never after now.
* **Comments move along.** Comment dates shift by the same amount as their post, so no comment is older than its post.

= Schedules =

Save any change as a schedule that runs by itself every day, week or month: for example "every Monday, set the modified date of the 20 least recently modified reviews to now", or "every night, spread the posts published in the last 7 days between 08:00 and 20:00". Each automatic run is kept in History and can be undone.

= Big sites =

Posts are changed in batches (100 per request by default), so no request runs into a PHP time limit, even with tens of thousands of posts. The modified date is written directly, so WordPress does not overwrite it with the current time. An option runs the usual "save post" hooks so SEO, sitemap and cache plugins notice the change.

The plugin adds a screen under Tools > Post Dates and a bulk action to the post lists. It adds nothing to the front end of your site, sends no data anywhere and loads no external files.

Plugin site: [quintaphon.com/wordpress/bulk-post-date-change](https://quintaphon.com/wordpress/bulk-post-date-change/)

== Installation ==

1. Install the plugin from Plugins > Add New, or upload the `bulk-post-date-change` folder to `/wp-content/plugins/`.
2. Activate it.
3. Tick posts in a post list and choose "Change dates", or go to Tools > Post Dates.

== Frequently Asked Questions ==

= Who can use it? =

Users who can edit other people's posts (editors and administrators). Each post is also checked: posts the user may not edit are skipped.

= Will my permalinks change? =

Only when your permalink structure contains the date (for example /%year%/%monthnum%/%postname%/). Then the post's address changes with its date. WordPress redirects many old addresses, but check your links after a large change.

= Why does the modified date matter? =

Sitemaps, feeds and search engines read it as "last updated". Setting it on its own lets you refresh posts you have reviewed without changing their published date.

= Can I undo a change? =

Yes. Open History and click Undo. History is kept for 30 days by default (an administrator can change it under Settings).

= Do schedules run on time? =

They run through WP-Cron, which fires when someone visits the site. On a quiet site, set up a real cron job that calls wp-cron.php.

= Where is the history stored? =

In `wp-content/uploads/bulk-post-date-change/`, in folders with long random names that block direct access. The plugin adds no database tables.

= What happens when I delete the plugin? =

Its settings, schedules and history are removed. Your posts keep their current dates.

== Screenshots ==

1. Overview.
2. Choose the posts with filters.
3. Choose the new dates.
4. Preview of old and new dates.
5. Schedules.
6. History with undo.

== Changelog ==

= 1.0.0 =
* First release.
