Problems fixing a REST API 404 after moving my WordPress directory and updating the permalink structure

I am running a self-hosted version of WordPress on a Linode VPS running Debian 9.

I first a. but was using wordpress /blog directory because I had a basic HTML site that I decided not to keep anymore, so I deleted everything /blog And put everything back in the original directory after deleting the content of my old site.

I followed the steps here and updated my permalink settings and used velvet blues To update my url, as well as to update the search and replace script to update my sql database.

I got some notifications from the Site Health tool saying that my REST API and Jetpack settings were not working properly. Similarly, I tried to configure Yoast SEO to optimize my web site, but it kept giving an error. According to his article I opened this page in Chrome’s DOM console and got this message.

Error

/wp-content/plugins/…min.css?ver=1.0.0:1 Failed to load resource: The server responded with a status of 404 () chrome-extension://c…ihfbcag/inject.js:1 Gave . jquery-migrate.min.js:2 JQMIGRATE: migrate is installed, version 3.3.2 Error prwirepro-press_rele…n-ajax-handler.js:1 Failed to load resource: The server responded with a status of 404 () Error /wp-json/wp/v2/:1 Failed to load resource: The server responded with a status of 404 () wp-api.min.js:2 Error /wp-json/yoast/v1/indexing/ prepare:1 Failed to load resource: The server responded with a 404 () error /wp-json/jetpack/v4/…pnonce=f0758236f2:1 Failed to load resource: The server returned 404 () chrome-extension Responded with a status of: //c…ihfbcag/inject.js:1 Starting. chrome-extension://c…ihfbcag/inject.js:1 Start. chrome-extension://c…ihfbcag/inject.js:1 Start. 2 /wp-json/yoast/v1/indexing/prepare:1 Failed to load resource: The server responded with a status of 404 () error prwirepro-press_rele…ibution-admin.css:1 Failed to load resource: The server responded with a status of 404 ()

Some of the references to press-releases are based on plugins I installed including what they were using /blog directory.

Update 1: I removed some of those plugins, including Jetpack and Press Release Distribution, and the errors subsided. The only one left is Yoast, which I’m assuming is because I changed my permalink structure. it was before

/index.php/%year%/%monthnum%/%day%/%post_id%/

And I changed it to */%post_name%/ and used their redirect tool to copy the code to my .htaccess file.

Also, when I go anywhere on my site, like http://www.sensation-experience.com/blah-blah-blah, I see the generic 404 message from Apache, Page not found message in WordPress, And I’m not sure why.

I’ve tried on several articles looking for a solution, but they are all based on the assumption that you are on a host, meaning you only have access to an ftp folder and a web-based control panel, Instead you have full access. box and doing everything by itself.

UPDATE 2: I completely wiped out my wordpress site and dropped the database and created a new one. I imported my WordPress content using the WXR XML file. I am able to access the WP admin and other controls, but when I click on any page on the homepage, I get an Apache 404 error message instead of WordPress’s 404 Not Found page. I tried updating my permalink several times, but to no avail. I also checked the .htaccess file, but everything looks good according to this article.

  • Can anyone advise me how to fix it?

Leave a Comment