Title: JSON blocks posts with optional permalinks
Last modified: June 20, 2022

---

# JSON blocks posts with optional permalinks

 *  Resolved [Dallman Ross](https://wordpress.org/support/users/spamless/)
 * (@spamless)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/)
 * I recently installed WordPress 6.0 from scratch on a Ubuntu 20.04 cloud server.
 * I overcame various stumbling blocks. But now the WP install is working well —
   except for one thing that has had me baffled: I could not create any posts.
 * `Publishing failed. The response is not a valid JSON response.`
 * I was about to uninstall the whole shebang and start over, when I found a partial
   fix: If I put permalink settings for posts back to `Plain` from `Month and name`,
   which I prefer, suddenly the JSON error goes away.
 * I did try everything on your linked page for this issue:
 * How to Fix The Invalid JSON Error in WordPress (Beginner’s Guide) [https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-invalid-json-error-in-wordpress-beginners-guide/](https://www.wpbeginner.com/wp-tutorials/how-to-fix-the-invalid-json-error-in-wordpress-beginners-guide/)
 * I went through all the points there. They did not resolve the issue.
 * Here is basic info on my server:
 *     ```
       $ uname -a
       Linux blog 5.15.0-1011-oracle #15-Ubuntu SMP Fri Jun 10 12:21:49 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fjson-blocks-posts-with-optional-permalinks%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15750951)
 * > If I put permalink settings for posts back to Plain from Month and name, which
   > I prefer, suddenly the JSON error goes away
 * If that (i.e. `Plain`) works, then try reading [Using_Permalinks ](https://wordpress.org/support/article/using-permalinks/)
   before setting a custom permalink structure again.
 *  Thread Starter [Dallman Ross](https://wordpress.org/support/users/spamless/)
 * (@spamless)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15753656)
 * > If that (i.e. Plain) works, then try reading [Using_Permalinks](https://wordpress.org/support/article/using-permalinks/)
   > before setting a custom permalink structure again.
 * Thanks, [@t-p](https://wordpress.org/support/users/t-p/), that does shed light
   on a few things. 👌
 * However, I am left scratching my head a bit nonetheless. The article says:
 * > NOTE:
   >  Your hosting provider should have set up the web servers with the necessary
   > configurations for the Pretty and Almost Pretty Permalinks to work correctly.
   > If they are not, then you need to contact your hosting provider.
 * Well, I’m my hosting provider. So, what’s the secret trick to setting up my configuration
   for a Pretty Permalink structure I prefer?
 * It was rather a trap for the unwary that caused me to spend many frustrating 
   hours trying to figure out why I couldn’t post after the sticky-wicket thing 
   I had done was to select a different option on a quite accessible and inviting
   configuration screen, after all…
 * I’m near to ready to mark the thread as resolved, but I’d still like to know 
   what those “necessary configurations” might be.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15753672)
 * Here are a few more tutorials on permalinks:
    [https://wpmudev.com/blog/wordpress-permalinks/](https://wpmudev.com/blog/wordpress-permalinks/)
   [https://kinsta.com/blog/wordpress-permalinks/](https://kinsta.com/blog/wordpress-permalinks/)
   [https://themeisle.com/blog/permalinks-in-wordpress/](https://themeisle.com/blog/permalinks-in-wordpress/)
 *  Thread Starter [Dallman Ross](https://wordpress.org/support/users/spamless/)
 * (@spamless)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15754407)
 * Thanks very much, [@t-p](https://wordpress.org/support/users/t-p/)!
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15754534)
 * You are welcome 🙂
 *  Thread Starter [Dallman Ross](https://wordpress.org/support/users/spamless/)
 * (@spamless)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15758661)
 * I’m coming back to this to post that finally I found a solution beyond the workaround
   the moderator showed me.
 * Try as I might, I still could not change Permalinks to anything non-default without
   the JSON publishing error returning. I meanwhile have read about a dozen interesting
   pages on this, one very good one of which was this one:
 * [https://passionwp.com/response-is-not-a-valid-json-response-error/](https://passionwp.com/response-is-not-a-valid-json-response-error/)
 * But not even that solved the issue. Now, however, I found this gem:
 * [https://codehunter.cc/a/wordpress/wordpress-jsonapi-wp-json-was-not-found-on-this-server](https://codehunter.cc/a/wordpress/wordpress-jsonapi-wp-json-was-not-found-on-this-server)
 * And that’s what has finally worked! Relevant text:
 * > [E]nsuring that my apache2.conf file (located in the folder /etc/apache2) has
   > its<Directory> directive ‘AllowOverride’ set to all rather than none
 * Yay!
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15758668)
 * Thanks for posting this info 🙂
 *  Thread Starter [Dallman Ross](https://wordpress.org/support/users/spamless/)
 * (@spamless)
 * [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15760338)
 * You’re welcome. I wish to add one more article to the collection of ones one 
   might recommend on this issue:
 * [https://blog.hubspot.com/website/json-response-error-wordpress](https://blog.hubspot.com/website/json-response-error-wordpress)
 * The reason I think this one deserves a look as well is that it includes a diagnostic
   tip that was important for me to understand the deep details of what was going
   wrong:
 * > Check the [browser] console and debug log.
   > For more advanced users, you can try digging into your browser’s console or
   > various debug logs to find a more specific problem. This isn’t really a solution
   > for casual users, though, as you’ll need some technical knowledge to accomplish
   > anything here.
 * There is a screenshot of the Chrome browser error console there, as well. For
   me, seeing the error messages on the browser console in real time helped me put
   two and two together and led to my finding the article I cited above on adjusting
   the apache2.conf `AllowOverride` directive to ‘`all`‘, which is what ultimately
   worked.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘JSON blocks posts with optional permalinks’ is closed to new replies.

## Tags

 * [json](https://wordpress.org/support/topic-tag/json/)
 * [publishing failed](https://wordpress.org/support/topic-tag/publishing-failed/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 8 replies
 * 2 participants
 * Last reply from: [Dallman Ross](https://wordpress.org/support/users/spamless/)
 * Last activity: [3 years, 11 months ago](https://wordpress.org/support/topic/json-blocks-posts-with-optional-permalinks/#post-15760338)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
