Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. WordPress (Developer)
  3. REST API goes 404 in 6.6.1 version

REST API goes 404 in 6.6.1 version

Scheduled Pinned Locked Moved WordPress (Developer)
6 Posts 2 Posters 2.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • chetbakerC Offline
    chetbakerC Offline
    chetbaker
    wrote on last edited by chetbaker
    #1

    Hello folks,

    I just created a website for a new project of mine where I need to use the REST API to post on a fresh Wordpress instance.

    I installed Wordpress Dev, but if I go to https://SITEURL/wp-json/wp/v2/posts it gives an ugly 404 error as shown

    ac88bb21-556d-4048-90d2-75baa4b5103c-CleanShot 2024-08-11 at 14.50.34@2x.png

    I tried with other WP installs I have and this is the only one that gives 404. I re-installed 6.6.1 and still the same error.

    I gave up trying to understand what is going on. Any hint?

    1 Reply Last reply
    0
    • J Online
      J Online
      joseph
      Staff
      wrote on last edited by
      #2

      I think you have to enable permalinks aka "rewrite structure" in wordpress. See https://stackoverflow.com/questions/49858884/wordpress-rest-api-returning-404 . Settings -> Permalink in WP.

      chetbakerC 1 Reply Last reply
      0
      • J joseph

        I think you have to enable permalinks aka "rewrite structure" in wordpress. See https://stackoverflow.com/questions/49858884/wordpress-rest-api-returning-404 . Settings -> Permalink in WP.

        chetbakerC Offline
        chetbakerC Offline
        chetbaker
        wrote on last edited by
        #3

        @joseph Yeah, I also checked that. This is a fresh install and I double check the permalink setting and it's on Plain. Still 404. (I also checked /index.php/wp-json/wp/v2/posts and also goes 404).

        J 1 Reply Last reply
        0
        • chetbakerC chetbaker

          @joseph Yeah, I also checked that. This is a fresh install and I double check the permalink setting and it's on Plain. Still 404. (I also checked /index.php/wp-json/wp/v2/posts and also goes 404).

          J Online
          J Online
          joseph
          Staff
          wrote on last edited by
          #4

          @chetbaker it should not be on Plain . Choose something else and it will work.

          1 Reply Last reply
          0
          • chetbakerC Offline
            chetbakerC Offline
            chetbaker
            wrote on last edited by
            #5

            oh you are right. Thanks!

            1 Reply Last reply
            1
            • J Online
              J Online
              joseph
              Staff
              wrote on last edited by
              #6

              @chetbaker I couldn't figure how these two are related i.e API and permalinks... Do you know?

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search