Moving wordpress to root folder = internal server error

You should look at the Codex (a great place to find answers) for information about moving a WordPress site. See https://codex.wordpress.org/Moving_WordPress . Follow those steps.

You’ll find (among your tasks) that you need to change the two URL entries in the wp-options table (which you already discovered), and then do a search/replace to change the old URL to the new URL. (Media, for example, stores the complete URL in the item’s database entry.)

I use the “Better Search and Replace” plugin to do that, but there are other options.

You may also need to look at your htaccess file when you are done. And, of course, make a backup of your database.