A group that I joined created a wordpress site before I joined. they did not set up permalinks for the site. So when I took over maintaining the site, I been optimizing the site both for SEO and speed. So I am getting to the posts task, which contain links to other posts on the same site, but because permalinks were off they look like http://THE_SITE/index.php?q=432post_id=432
within every post. I already enabled the %postname% permalink, so google is already updating its urls because of the 301's, but the problem is the posts still have the old default links.
So the question is: What is the best way to update the old links to the new permalinks