How to update all posts at once?

I think you want to mass change old URLs in website database after migration. You can do it either by using plugin or manually.

Plugin Method:

The Velvet Blues Update URLs plugin enables you to change the URLs at various places, like posts and pages excerpts. Follow these steps:

  1. Install and activate Velvet Blues Update URLs plugin.
  2. Head to Tools > Update URLs.
  3. Insert the old site address in the Old URL field.
  4. Insert the new site address in the New URL field.
  5. Check the boxes in front of URLs in page content, URLs in
    excerpts
    , URLs in links, URLs for attachments, and URLs
    in custom fields and meta boxes
    .
  6. Finally, click on Update URLs NOW button.

Manual Method:

There are various ways of mass changing old URLs manually. They are:

  1. Changing the URL directly in the database
  2. Use PHPMyAdmin script for Search and Replace in Database

You will find the details of the manual methods right here.