I have deleted a page and now I want to find all internal links that are pointing to this deleted page.

So I need to know which posts/pages have a link to the deleted page.

Is there a faster way to do this than just manually checking all your pages and posts?

Please advise me.


I found it is easier to use a service like https://validator.w3.org/checklink to check any broken link than checking through wp_posts database. You enter your site url and it will check through all the pages on your site and provide a list of broken links. You can then go and edit the pages with broken link.

| improve this answer | |

I would search the database's wp_posts table to find the URL(s) you are looking for, using phpmyadmin.

| improve this answer | |
  • Thanks, but the problem is that the main menu also linked to this page and thus the search results returned all pages and posts. :-( – John Jun 3 '13 at 21:55
  • 2
    I think GhostToast's method should be enough, here is a sample query: SELECT CONCAT("http://yoursite.com/wp-admin/post.php?post=", ID, "&action=edit") FROM wp_posts WHERE post_content LIKE '%http://yoursite.com/the-url-to-find%' AND post_status = 'publish'; You just need to replace yoursite.com and yoursite.com/the-url-to-find with the real urls – davidmh Jun 3 '13 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.