Moving wordpress from sub to root makes inner page menu links route to 404! How can I solve this?

I moved my site from sub-directory to the root using the index.php method and after successful moving, all my internal/inner site pages like testimonies, contact us etc are showing and routing to 404 except those I anchor# to the section. How can I solve this?