LeadPages and WordPress Transients: 401 Unauthorized Errors

Is your database getting larger? Are you thinking of deleting the transients in your WordPress database using a WordPress cleanup plugin? Don’t! I did exactly that and paid a big price.

I was looking through WP-Rocket the other day and found an interesting area for cleaning up your database. One of the options asks you to clean up the transients in your database. In my case, there were over 360+ and I was quick to purge them all.

Awesome! I had cleared around 40mb of space from a 220mb database and the site was running quicker.

Then, the complaints started coming in. “This page is showing a 401 Unauthorized error” and “that page is broken”. After looking through the pages, they were all LeadPage landing pages being shown with the LeadPages WordPress plugin.

It turns out that many of the transients that were deleted included critical LeadPages data that was needed for the Landing Pages to render.

I contacted LeadPages support and they were nice, but I could tell they were leading me down the usual WordPress plugin fix alley. So I kindly excused myself and said I would try a database restore and reopen the ticket if it didn’t work.

Luckily, there was a database backup from the night before thanks to WHM backups to Amazon S3. So after a 9gb download, I extracted the sql file and restored the WordPress database through the command line.

So bottom line: do not delete transients if you’re running a the LeadPages WordPress plugin! If you did, go grab a backup and restore your database because deactivating, deleting and reuploading the LeadPages plugin did not work.

Here are some other WordPress transient plugins that can get you into trouble with transients and LeadPages:

Good luck and keep reliable backups!