WPIntell

Source evidence

Getting 500 error trying to save snippet

Code Snippets · support · 2026-03-04T13:37:00+00:00

complaintsentiment
highseverity
1.0relevance
3replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 35 rows with source links

14.3% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

30 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
csdsubscriber unresolved
A particular snippet is not letting me save it after updating it. I get a message that says: “Could not update snippet. Request failed with status code 500” Checking the console a different error message shows that says: Failed to load resource: the server responded with a status of 500 () When I click on the link it provides I get this: {“code”:”rest_forbidden”,”message”:”Sorry, you are not allowed to do that.”,”data”:{“status”:401}} I opened a new snippet and pasted the code I was trying to save into the first snippet and it saved just fine. Other snippet files seem to be saving fine too. The code in the “unsaveable” file is still running. But I wouldn’t be able to make any modifications to it. Thankfully this is a fairly stable code base in this snippet. For now I’ve just created a temporary “supplement” file so I can keep going here. But definitely need to get to the bottom of why this is happening asap! Hello @csdsubscriber , Thanks for reaching out and for the detailed explanation — that’s very helpful. From the error messages you shared, the key part is the response: rest_forbidden – "Sorry, you are not allowed to do that." (401) This response usually means that the request to update the snippet is being blocked at the WordPress REST API permissions/authentication level. Since other snippets save normally, the same code saves fine in a newly created snippet and the existing code is still running correctly, it suggests the save request itself is being blocked rather than the code inside the snippet. In many cases, this can happen when something in the site’s environment interferes with the REST API request. Common causes include: A security or firewall plugin (such as Wordfence or similar) An external firewall or WAF like Cloudflare or Sucuri Role/capability management plugins that modify permissions Temporary authentication or session/nonce issues Since the plugin sends the update through the WordPress REST API, the “Sorry, you are not allowed to do that.” message typically comes from WordPress (or a security layer in front of it) when the request is blocked. Also, could you please let us know which version of the Code Snippets plugin you’re currently using? If you’re not on the latest version, we recommend updating. If the issue started after updating to the most recent release, you might also try temporarily rolling back to the previous version to see if the behavior changes. Thanks again for the detailed report and for sharing the workaround you set up in the meantime. Let us know if this helps ☺️ Thanks for your reply. The version we’re using is Version 3.9.5. Not sure how to know if that’s the most recent. I know an update of Code Snippets did roll out recently and this problem was discovered after. I’ll try a rollback if I can figure out how to pull that off lol. I’m not finding any clear way to do that, so feel free to give me instructions for rollback and I’ll give it a go for you (us!). 🙂 This reply was modified 2 months, 2 weeks ago by csdsubscriber . Hello @csdsubscriber , Thanks for getting back to us and for sharing the version you’re using. Version 3.9.5 is a recent release. If there’s no notice on your Plugins page indicating that an update is available, that usually means you’re already running the latest version. You can also confirm the version information by going to Snippets → Settings → Version in your WordPress dashboard. It’s always a good practice to check whether an issue might be related to a recent update, especially if the behavior started around the same time. That said, it doesn’t necessarily mean the update is the cause — sometimes issues like this can also be related to security plugins, firewall rules, or other environment restrictions that may block certain REST API requests. It’s also worth noting that from your description the issue appears to be specific to one particular snippet , since other snippets save correctly and the same code worked when placed in a new snippet. That suggests the request to update that specific snippet may be getting blocked rather than there being a general problem with the plugin. If you’d like to test whether the behavior changes with a previous version, Code Snippets includes a built-in rollback feature available at: Snippets → Settings → Version From there you can install a previous version of the plugin (for example 3.9.4 ) and see if the issue still occurs. If you try that, please let us know whether the problem persists after rolling back.

Comments

3 shown
Carolina 2026-03-09T17:50:00+00:00

Hello @csdsubscriber , Thanks for reaching out and for the detailed explanation — that’s very helpful. From the error messages you shared, the key part is the response: rest_forbidden – "Sorry, you are not allowed to do that." (401) This response usually means that the request to update the snippet is being blocked at the WordPress REST API permissions/authentication level. Since other snippets save normally, the same code saves fine in a newly created snippet and the existing code is still running correctly, it suggests the save request itself is being blocked rather than the code inside the snippet. In many cases, this can happen when something in the site’s environment interferes with the REST API request. Common causes include: A security or firewall plugin (such as Wordfence or similar) An external firewall or WAF like Cloudflare or Sucuri Role/capability management plugins that modify permissions Temporary authentication or session/nonce issues Since the plugin sends the update through the WordPress REST API, the “Sorry, you are not allowed to do that.” message typically comes from WordPress (or a security layer in front of it) when the request is blocked. Also, could you please let us know which version of the Code Snippets plugin you’re currently using? If you’re not on the latest version, we recommend updating. If the issue started after updating to the most recent release, you might also try temporarily rolling back to the previous version to see if the behavior changes. Thanks again for the detailed report and for sharing the workaround you set up in the meantime. Let us know if this helps ☺️

csdsubscriber 2026-03-09T18:57:00+00:00

Thanks for your reply. The version we’re using is Version 3.9.5. Not sure how to know if that’s the most recent. I know an update of Code Snippets did roll out recently and this problem was discovered after. I’ll try a rollback if I can figure out how to pull that off lol. I’m not finding any clear way to do that, so feel free to give me instructions for rollback and I’ll give it a go for you (us!). 🙂 This reply was modified 2 months, 2 weeks ago by csdsubscriber .

Carolina 2026-03-10T22:45:00+00:00

Hello @csdsubscriber , Thanks for getting back to us and for sharing the version you’re using. Version 3.9.5 is a recent release. If there’s no notice on your Plugins page indicating that an update is available, that usually means you’re already running the latest version. You can also confirm the version information by going to Snippets → Settings → Version in your WordPress dashboard. It’s always a good practice to check whether an issue might be related to a recent update, especially if the behavior started around the same time. That said, it doesn’t necessarily mean the update is the cause — sometimes issues like this can also be related to security plugins, firewall rules, or other environment restrictions that may block certain REST API requests. It’s also worth noting that from your description the issue appears to be specific to one particular snippet , since other snippets save correctly and the same code worked when placed in a new snippet. That suggests the request to update that specific snippet may be getting blocked rather than there being a general problem with the plugin. If you’d like to test whether the behavior changes with a previous version, Code Snippets includes a built-in rollback feature available at: Snippets → Settings → Version From there you can install a previous version of the plugin (for example 3.9.4 ) and see if the issue still occurs. If you try that, please let us know whether the problem persists after rolling back.