Pretty Link Management

illmasterj

BuSo Pro
Joined
Aug 5, 2018
Messages
462
Likes
402
Degree
2
I bought a Wordpress site last year that uses Pretty Links to manage affiliate links. There are around 3500 links, many of them are dead. From what I can tell, a lot of these links aren't even in any content.

I want to do 2 things:
  1. Find any Pretty Links not used anywhere within the site and delete them from the Pretty Links table in the database
  2. Crawl the existing Pretty Links, follow all redirects and find if any affiliate programs are offline or finish with a 404 code
I have some ideas on how to do part 2 but don't know how to do a bulk database search on a bulk list of URLs. Has anyone tackled this type of thing before?
 
Have you checked the Pro version?

I know you can at least export and import the links in the pro-version, so you could export them and then use something like Screaming Frog to look up each link for 404s.

As for 1. you might want to see if you can sort by clicks, if the link was never used.

I would try to write the plugin author though and ask: https://prettylinks.com/contact/
 
I have, but don't know if the pro version will help.

For 1, I might have been unclear. I can sort by links with 0 or few clicks, but in some cases these links have been clicked on thousands of times, years ago. Now the page it was on has been deleted, but the Pretty Link entry remains. I want to clean those u.

For 2, yeah it should be fairly simple. I can use SF or another redirect checker to crawl those.
 
One way to do this would be MySQL operations, but I'd really only suggest that for finding the Pretty Link URLs. I wouldn't try to remove the links that way. You're bound to have edge cases that leave broken HTML or worse issues.

What I would do is either export the click tracking information if possible or just flat out delete it all (which should be possible, I don't know though, never have used this plugin).

Then you could crawl your site and all outbound & internal links using something like Screaming Frog, Xenu Link Sleuth, Integrity, etc. This would repopulate the click data, but only for ones that exist.

You could export those, order them alphabetically, and then do the same in the dashboard, while displaying the maximum number of links on a page. I'd probably not go higher than 250 a pop so you don't have operations timing out. But you could "check all" and then run down comparing your alphabetical list of ones with clicks, UN-TICKING those in the dashboard. Once you un-tick all of them on that page of 250 links, you can mass delete what remains.

Then, once done, you could possibly re-import the old click data, but you might end up with a ton of orphan data for links that no longer exist, could possibly break things.

That's what I'd do if you're okay with deleting the click data altogether. You can take an export so you have historical data to look at later if needed.
 
I've used this Better Search Replace free WordPress plugin help clean up a messy/misconfigured database after migrations from a local dev environment to server when things weren't working quite right. Might be what you're looking for and hope it helps without requiring the pro version of course.
 
Thanks for this everyone. I was really hoping for a very bulk way to update these but it's not happening.

Here's my process so far:
  1. Update to Pretty Links Pro
  2. Export to CSV
  3. Crawl complete list using Screaming Frog (list mode, following redirects)
  4. Filter by status code 404
  5. Move those links to Trash
  6. Use the Pretty Links Trim Clicks feature to delete clicks older than 90 days
  7. Anything with 0 clicks, move to trash
  8. Visit Sharesale, look at closed merchants
  9. Search Pretty Links, bulk delete anything from those domains with 0 clicks or more
  10. Links with clicks, find suitable programs to replace them with
  11. Crawl site for broken links
  12. Remove or fix those broken links manually, ugggghhhhhh
This still doesn't fix the issue of these products being out of stock/just being redirected to a home page. I'll work on that next. Really though this reinforces my theory that "resource websites" with fewer pages that really pack a punch are more valuable than enormous content sites that are difficult to manage at scale.
 
Back