Settings in .htaccess
tell the server how to handle requests. Since the site previously allowed both www and non-www URLs, you’ll want to keep your .htaccess
in place, so old links redirect properly. However, that doesn’t tell WP that it’s now living in the www
subdomain; it stores URLs in many places.
You can ignore the GUIDs – they’re just unique IDs – but you can run a search and replace script or plugin to update all the other URLs in the database.
If you have WP CLI enabled, the command is
wp search-replace 'https://example.com' 'https://www.example.com'
If not, there are also database migration plugins available that will update all the URLs and re-serialize them properly in the database.