Texts disappeared because Keep Messages was set to 30 days or 1 year

Short answer

If Keep Messages is set to 30 Days or 1 Year, Messages deletes older texts and attachments automatically, so check the setting and look for a backup from before they were removed. Set it to Forever now to stop further loss, and then look in Recently Deleted and in older backups.

TextExhibit start screen with four sources: This Mac’s Messages, iPhone via USB, an existing backup and sample data
Where TextExhibit can read messages from. Shown with the app’s built-in sample conversations; the names and numbers are made up.

Confirm the cause

  1. Open Settings, Apps, Messages, then Keep Messages on the iPhone (older iOS: Settings, Messages).
  2. On a Mac, Messages, Settings, General, Keep messages.
  3. If either says 30 Days or 1 Year, the loss fits.

Stop it

Choose Forever on every device. See Keep Messages.

Where to look

  • A Finder backup from before the cutoff. See finding the right backup.
  • An iCloud Backup, which needs a spare device.
  • The other person’s phone.
  • Recently Deleted, which may not hold them. See Recently Deleted.

If you need records in future

Make a backup and export your important threads with TextExhibit regularly.

How to tell what the setting removed

If every conversation stops at about the same cutoff date, say 30 days ago, and nothing older exists anywhere, the setting is the likely cause. If only some threads are missing, think of deletion by hand, filters or group changes instead.

Immediate steps

  1. Switch Keep Messages to Forever on the iPhone and the Mac.
  2. Do not make a new backup yet.
  3. List the backups you have by date.
  4. Choose the newest one dated before the cutoff.

Learn from it

Once you have switched the setting, add a regular backup to your routine. Messages are the sort of data that you only miss when it is gone, and a monthly backup is cheap insurance.

Check other devices too

  • An iPad or Mac that was offline may still hold older messages that have not synced the deletion yet.
  • Do not connect that device to Wi-Fi until you have copied what you need.
  • Turn off Messages in iCloud on it with care, after a backup.
  • Export from it right away.

What to keep in mind

  • There is no way to recover messages the setting removed unless a copy exists.
  • The deletion applies to devices signed in to the same Apple Account.
  • Backups made after the deletion lack them.

Questions

Was it a bug?

Probably the setting.

Can Apple restore them?

Apple does not offer that.

Does it affect attachments?

Yes, both texts and attachments.

Sources

Export the whole conversation

TextExhibit turns a conversation into one PDF with exact times, names and numbers, photos in place and page numbers, on your Mac. Free to preview; $24.99 once to export.