Support » Fixing WordPress » Change ?page_id internal links into real URLs

  • Hi!

    Our content team build our website, without thinking of SEO and sitespeed.. They used the ?page_id=XXX function within the SiteOrigin Page Builder, which means that we’ve now 516 internal links with:

    domain.com/example?page_id=123 (parameter URL) which is redirecting you to domain.com/example-123/ (real URL) for example.

    Is there a way to replace all the parameter internal links (domain.com/example?page_id=123) into real URLs (domain.com/example-123/) in bulk?

    Thanks!

    • This topic was modified 3 weeks ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Pick a permalink setting under SETTINGS->PERMALINKS.

    I thought so too, but this one is already standing on “day and name”, so i suggest that’s not it?

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    Is the issue that whoever put in the links use ?p=xxx or that “normal” links (example.com/post-slug) don’t work?

    The issue is that the team used ?p=XXX links while they were linking to an internal page during they were working on creating the pages. I need to change these internal links from ?p=xxx into “normal” links. I prefer to do this in bulk (as there are currently 516 of them) and need to know how?

    Does WordPress has a way to do that?

    Thanks!

    Moderator Steve Stern

    (@sterndata)

    Support Team Volunteer

    I know how one might generate the SQL and/or PHP* to do this, but I haven’t found any automated, in the can solution so far. I’m asking around.

    * something like

    1. Obtain a list of all internal links of the form ?p=xxxx.
    2. Write a script to make a table where each row is a pair, xxxx and slug
    3. Write a script to read the content of a post and do the substitutions.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    Don’t the ?p= links redirect already? This is an internal function of WordPress, the redirection means that SEO is not much of a factor, since a search engine will follow the links and notice the redirection happening.

    florisimoo

    (@florisimoo)

    Thanks Steve! Will go for that one then 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.