How do I move files and directories after installation? I moved directory within a server so the Drupal 8 installed URL should change from ip-address/old-folder/d8 to my-site.com/d8/.

When I checked the new URL, the front page worked, but other pages gave a 404 error that said old-folder/d8/admin/structure/.

I read Moving drupal to a subdirectory, but the answer there didn't resolve my problem.

Which file/config I should change in Drupal 8.6?
I would expect you just need to clear (or 'rebuild' as it is often called nowadays) the cache, as 4k4 is suggesting in a comment.

There are several ways you can do that: 


The "built-in" option is to go to /admin/config/development/performance and hit the clear cache button there.
Another popular option is with drush, where you could issue drush cr to rebuild the cache from the command line. Your site or server would need to have drush installed, though. It can be a lifesaver if for whatever reason you can't get to the UI page, though.
In a similar vain, drupal console (a tool quite similar to drush) can do the same thing, with drupal cache:rebuild, drupal cr or drupal cc.
If you are running with the default database cache mechanism, you can truncate the tables that start with cache_ as their table name. Treat this as a last resort, though, and do make a backup in case you make a mistake. In particular, do not truncate the cachetags table.