Rest API Error after migration
-
Getting an error on the rest api:
The REST API call gave the following unexpected result: (404) <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>404 Not Found</title> </head><body> <h1>Not Found</h1> <p>The requested URL was not found on this server.</p> <hr> <address>Apache/2.4.29 (Ubuntu) Server at designs.5di.me Port 443</address> </body></html> .This is a site that I migrated using all in one migration. I notied some things weren't working so i deactivated all plugins and went back to original theme. I see this error in site health.
Not sure how to proceed to fix this on cloudron. -
yes the site itself its totally working. Just the rest-api isnt, which is a problem because I intended to use it as my design template library. The core functionality requires the rest-api to work. Which is probably what caused it to error. My not deactivating the plugin before I packaged it for migration. Im just not sure how to go about fixing it.
the site is https://designs.5di.me
-
I had two plugins that used the rest api in a way that could have caused this, they are both deactivated and the error on the rest api still persists. Do i delete their options tables or amm I thinking in the wrong way? I got the same error when I tried to do anything related to the sites functions which prompted me to deactivate all plugins, problem persisted.
-
The REST API does seem to work:
$ curl -X OPTIONS -i https://designs.5di.me/wp-json/ HTTP/2 200 server: nginx date: Wed, 14 Oct 2020 04:12:14 GMT content-length: 0 allow: HEAD,GET,POST,OPTIONS strict-transport-security: max-age=15768000 x-xss-protection: 1; mode=block x-download-options: noopen x-content-type-options: nosniff x-permitted-cross-domain-policies: none referrer-policy: no-referrer-when-downgrade
Could it be related to permalink style? It's under Settings in the WP dashboard (because I notice that your posts are of the year/month/date format)
-
@derin I see the 404 in the logs
2020-10-14T04:13:02.000Z 172.18.0.1 - - [14/Oct/2020:04:13:02 +0000] "GET /2020/09/01/hello-world/ HTTP/1.1" 404 457 "https://designs.5di.me/" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0"
So, just to double check: the posts are inside the admin panel just fine but getting the pages like above doesn't work? Usually, this just means that either htaccess is messed up OR the permalink structure is wrong. When you navigate to the post via the WordPress Dashbaord what do you see in the URL bar?
-
Going to the posts is seems fine at the moment. The things that do not work are when the system tries to make an api call out. So for example, i attempted to re-authenticate a plugin - Envato Elements using my api key and it displayed the error shown above. Then I tried contect to an external website that this would feed data to using another plugin called Project Huddle, and I got the same API error. I actually had not attempted to even look at a post. This site will serve as a repository of elementor templates. So I can store all the templates I create and easily push changes to the client sites connected. There isnt a plan for a front end except to check if a template looks good.
-
https://designs.5di.me/test/
Created a test post which worked after I updated permalink structure which was set incorrectly.