MediumIf your WordPress widgets are locked and showing a JSON error, there’s a simple fix | by Dave Flynn | Medium
Sitemap

Member-only story

If your WordPress widgets are locked and showing a JSON error, there’s a simple fix

Why widget areas show a padlock and how to remove a widget when the UI won’t let you

If you’re not a Medium member, read the full article here.

I was helping a client remove a widget from the footer on their website recently when I ran into this error:

“There was an error. The response is not a valid JSON response.”

Press enter or click to view image in full size
The Jetpack subscribe widget I was trying to remove
The Jetpack subscribe widget I was trying to remove.

Widget Areas were padlocked

Checking the widget areas in list view showed a padlock, and I couldn’t see any way to unlock them. I’m not sure why it happened, but it’s an older, pre-Gutenberg theme, which might have something to do with it.

Widget areas showing  a padlock in the WordPress admin panel
Widget areas were padlocked.

The Classic Widgets plugin didn’t work

Googling the issue, I found this video, which suggests using the Classic Widgets plugin. However, even in classic view, the widgets couldn’t be moved or deleted.

Solution: WordPress CLI

Written by Dave Flynn

I'm a full stack developer and server admin. I write about the tools, scripts, and workflows I use in my day-to-day work.