I updated Wordpress to the latest version (5.0.3). Now, any time I try to post I get a red message that says "Publishing failed". If I try to save a draft I get "Updating failed".
In console, I'm seeing
https://mydomain/com/blog/wp-json/wp/v2/posts/1177/autosaves?_locale=user 404
When I test the URL with /wp-json/wp/v2/posts/
I get a 404. If i use ?rest_route=/wp/v2/posts/
instead, I get my blog. I'm using Post name for permalinks.
Is there a way I can change the WordPress editor to use the rest route that is working? Or can I change something in my Nginx config?
two easy solutions:
Setting->Writing->Allow users to switch editors
then in the create page, you have this option
For block editor => Switch to Classic Editor
And Classic editor => Switch to Block Editor
我将我的固定链接更改为普通链接,然后它就可以工作了,否则它会抛出同样的错误!
I guess this has something to do with permalinks and how url is rewritten. once I change my permalinks option to plain everything seems fine. I'm using a local install with nginx. hopefully will find out why this happens later.
I had a similar problem with WordPress 5.2.2. I couldn't save or publish a page (new or old). Although all requests in the page editor return 200 I realized that some requests had a request domain of my site and others a request domain of the hosting company. So, I went to Settings > General and changed the settings Site Address (URL) and WordPress Address (URL) to be the same value (I copied the value of Site Address (URL) into WordPress Address (URL)) and that fixed the problem with the editor.
Step 1 : Open the WordPress and login as administrator. When you post new content or older content you will be getting error message.
Step 2 : So, now choose the older version of Editor of WordPress instead to use new version. To choose older version go to settings and then click on writings. Here you can find option "Classic Editor" and if you will not find option then choose second option.
This is one option but if you are not fixed with this option choose second option such as
Open the WordPress and on the left side you have list of tasks to be performed in WordPress. Click on the option “ Plugin ” and you will be opened with the plugin screen. On the top of the screen, you have the button “ add new ”.
Step 3 : After clicking on the add new button, new screen will be opened. There, you can see classic editor plugin. Kindly, download and install it. Once it is installed, then activate it by clicking on the “ activate ” button.
Step 4 : Again, go the Settings option and click on the Writing. In the Writing section, you have many options such as formatting, default post category, default post format, default editor for all users, allow users to switch editors, post via email etc.
Click on the classic editor choice in default editor for all users. This makes you to work easy on content posting newly or updating the previous contents.
With wp cli:
When we get 404 in wordpress pages and publishing failed there could be an issue with .htaccess file. Update your Permalink settings and check .htaccess file, If .htaccess file is exist, and it's correct, confirm in your server .conf file have Or your .htaccess file is not able to override server configuration
<Directory /var/www/web-app-wordpress>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
Restart apache server after updating this code.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.