Your posts, pages, and theme configuration are stored in the database, not in files. You need to copy the database and update your site URL there as well.
When you ask WordPress-specific questions it would be helpful if you mentioned you’re using WordPress in the post