• I made a change a while back that keeps people from seeing categories in the links. So for example, https://www.webpage.domain/CATEGORY/postname

    When I did that apparently I broke all of my posts that have links to other posts inside of them. In all of the posts I have links to other posts that have similar information or whatever. Is there an easy way to fix this or am I going to have to go in over a thousand posts and make the change?

    Right now I am finding the bad link in the post, editing it and updating but that will take forever.

Viewing 3 replies - 1 through 3 (of 3 total)
  • If the link is in the post content, I’m thinking that maybe you can run an SQL query to update all links if you are changing the same portion. You can run something like:

    UPDATE wp_posts SET post_content = REPLACE(post_content, 'https://www.webpage.domain/CATEGORY/', 'https://www.webpage.domain/');
    

    This query will update the post_content field in your wp_posts table, replacing all instances of https://www.webpage.domain/CATEGORY/ with https://www.webpage.domain/.

    It’s important to note that running a SQL query directly on your database can be risky if you’re not familiar with it. It’s recommended to make a backup of your database before making any changes and to test the query on a small subset of your posts first to ensure that it works as expected.

    lisa

    (@contentiskey)

    Thread Starter jtoney7852

    (@jtoney7852)

    So why did this happen in the first place? I’ve changed the page linking before without problems.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Post linking problems’ is closed to new replies.