Ever updated a blog post and suddenly your LinkedIn followers got spammed with the same article… again? 😬
That’s exactly what was happening to us. Every time we fixed a typo or tweaked a sentence, the WP LinkedIn Auto Publish plugin would blast the post to LinkedIn as if it were brand new. Not a great look.
The short version: We found a one-line bug in the plugin code that causes this. The fix is simple, and we’ve already submitted it to the developer. Here’s how we found it (and how you can fix it yourself if you’re comfortable with code).
The Problem: Every Edit = New LinkedIn Post
The WP LinkedIn Auto Publish plugin is supposed to share your posts to LinkedIn when you publish them. Key word: publish.
But there’s a bug. The plugin doesn’t check if the post was already published. So when you:
- Fix a typo
- Update an outdated link
- Tweak the SEO title
- Add a paragraph
…the plugin happily fires off another LinkedIn post. Your audience sees the same article multiple times. Awkward.
Finding the Bug 🔍
We dove into the plugin code to figure out what was going on. Here’s what we found in wp-linkedin-auto-publish.php at line 679:
if ( 'publish' === $new_status ) {
See the problem?
The code only checks if the new status is “publish.” But it doesn’t check what the old status was. So whether you’re publishing a draft for the first time or updating something that’s been live for months—same trigger.
The One-Line Fix ✅
The fix is embarrassingly simple. We just need to also check if the post wasn’t already published:
❌ Before (buggy)
if ( 'publish' === $new_status ) {
✅ After (fixed)
if ( 'publish' === $new_status && 'publish' !== $old_status ) {
That’s it. One condition added. Now the plugin only posts to LinkedIn when a post transitions to published—not when it’s being updated while already published.
How to Apply the Fix Yourself 🔧
If you’re comfortable editing PHP, here’s how to fix it:
- Open
wp-linkedin-auto-publish.phpin your plugins folder - Go to line 679
- Find:
if ( 'publish' === $new_status ) { - Replace with:
if ( 'publish' === $new_status && 'publish' !== $old_status ) { - Save the file
Important: Your fix will be overwritten when the plugin updates. Either wait for the official fix, or use a child plugin approach to make the fix permanent.
We Submitted the Fix
We’ve already reported this bug and submitted the fix to the plugin developer through the WordPress.org support forums. Hopefully it’ll be included in the next update.
Until then, you can apply the fix yourself or just be aware that updating posts will trigger new LinkedIn shares.
Why We Share Our Fixes 💡
At Devenia, we use a lot of plugins across many sites. When we find bugs, we don’t just fix them for ourselves—we share the solutions.
Why?
- It helps the community. Someone else is probably hitting the same wall.
- It helps the developers. Plugin authors can’t test every scenario—user feedback makes plugins better.
- It proves we actually know code. Anyone can talk about web development. We’d rather show it.
The Bottom Line
If WP LinkedIn Auto Publish is re-sharing your posts every time you update them:
- It’s a known bug in the plugin
- The fix is one line of code
- We’ve submitted the fix—hopefully coming in the next update
In the meantime, either apply the fix yourself or just avoid editing published posts until the update rolls out.
Happy publishing! 🚀