Importing Posts into New Website with Same User ID’s

Don’t bother with the SQL import, instead use a standard WXR import/export.

The importer will ask you which users map onto which during import, letting you create new users or assign old ones, then update all the authors on import.

For larger imports, use WP CLI for both the import and export. Make sure it chunks the import into files with 250 posts max so that memory doesn’t become an issue, and pass it a text file mapping all the old users to new users.

If you can’t run WP CLI on your server, pull down the site on to a local dev environment, run WP CLI on your machine locally, then do the same for the import, and transfer the database in full to the new remote location