Updating failed Post in Wordpress - wordpress

I am working on WordPress blog and just started to post a new post its giving error me "Updating failed". I am not able to edit the sample post and also not able to post a new article.
WordPress Version: 5.0.2
Any Idea to resolve this issue?
Thanks
Browser Inspector View

This problem is caused by the Gutenberg editor.
If you're website is hosted by any hosting provider, use the classic editor.
If you're hosting your website on a VPS, and you're running on Apache, try adding
<Directory /path/to/your/website>
AllowOverride All
</Directory>
To your virtual host.

If you want to get rid of this issue, you have to change the permalink structure from the admin side.
Please read this article Solution link

I saw the same problem occur when I would select certain Permalink settings (specifically ones that caused the site's .htaccess to contain anything other than a blank file).
The issue ended up being: I did not have mod-rewrite enabled on my server.
The fix: I uncommented the below (in httpd.conf) and the problem went away (and it stayed fixed no matter what Permalink settings I select in WordPress) (be sure to restart Apache after httpd.conf edits)
LoadModule rewrite_module modules/mod_rewrite.so

WordPress permalinks error for "pretty permalinks" on a Google Cloud instance gives 404 error on all the pages even if created using the default permalink, reverting it back to "pretty permalinks".
I like "pretty permalinks" and found out the best solution for the above situation is to
Enable mod_rewrite in Apache:
Then, goto
Compute Engine>VM Instances > SSH
Type $: a2enmod rewrite
Type $: sudo nano /etc/apache2/apache2.conf
then Change: AllowOverride ALL from AllowOverride NONE
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride ALL
Require all granted
</Directory>
Restart Apache Server:
sudo service apache2 restart
It should now update, create posts/pages in "pretty permalinks" with default Gutenberg editor without giving 404 error.
Solves the Rest API error
https://www.praj.info

My site was behind Cloudflare and this seemed to be the reason for this issue.
In order to fix it I just installed cloudflare plugin for wordpress.

This error occurs when you are working on the Gutenberg editor. You can use the classic editor to overcome this problem.
Go to the plugins>add new
Search for a classic editor plugin and install it.
If this doesn't work deactivate all plugins.
After, you disabled all plugins start enabling plugins one by one to see which one will break WordPress again.
Or you can see this article:- fix WordPress updating failed while creating or publishing a post.

Check the url in the wordpress setting, you probaly set website url as "http". It'll be fixed.

Related

Error 404 on the homepage of wordpress site

my website www.auzcan.com 's homepage is showing 404 error, however other pages are working fine after installation of SSL certificates from GoDaddy. I've tried every solution available here but all in vain. Looking forward for help from your end. Thanks in Advance.
Try checking what your front page is set to in Admin panel-> Settings-> Reading.
It should either have the your latest posts option selected, or the static page option selected and the front page set to a valid page.
it might be a case of not having a home page set correctly
I had exactly the same problem and the solution for me was to add these lines to /etc/apache2/sites-enabled/default-ssl.conf, which is my SSL-enabled website's configuration file:
<Directory /var/www/html/>
AllowOverride All
</Directory>
Of course, this assumes DocumentRoot /var/www/html. Change accordingly if is this is different in your setup.
The thing is that Wordpress uses .htaccess rules to process the URLs and for them to work, AllowOverride All needs to be in the server's configuration file.
In my situation, the configuration for the non-SSL and SSL-enabled variants were in a separate files. The non-SSL configuration had AllowOverride All all along, and so everything was working fine. Once I had enabled the SSL, the other configuration file came into play and didn't have the required AllowOverride All setting.

How do I get access to my .htaccess files on Google Cloud for my Wordpress Website?

I migrated a website from one web host to another (which is Google Cloud), but I'm having problems changing my permalinks from plain to post name. I want to have the website show the name of the page on the url, but I can't figure out how to get access to my .htaccess files on Google Cloud to see if this is the cause of it.
The error on the website pages are 404 Not Found. But the pages are found if the permalinks are on plain and not on %postname%.
I'm working on a wordpress file.
I tried to change permalinks to %postname% in the wordpress dashboard, but I received an error. I also tried to see if plugins were an issue but its the permalinks needed to be on "plain" setting.
Access SSH: Go to edit your apache .conf
sudo nano /etc/apache2/apache2.conf
<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride ALL <----(edit from none)
Require all granted
</Directory>
Then restart apache2 using:
sudo service apache2 restart
I had the same issue, I hired someone to move a client site (tenwitch.com) to GCP, and when it is time to adjust some little stuffs. I decided to do it myself only to find out that it is not the traditional cpanel I am used to. What you are going to do is download filezilla (https://filezilla-project.org/download.php) and PuTTY, there are tutorial online to follow. You will be able to set it up instantly.

Woocommerce REST API 404 error

Since woocommerce released the 2.1 version with REST API feature, I tried to use it: I activated the API on my woocommerce admin panel but when I try to call the curl: http://www.mydomain.com/wc-api/v1/
the response is a 404 file not found error.
I tried to check everything in internet, I've read woocommerce docs but I cannot figure out what I have to do: probably some setting in the server apache or php... I don't know..
Thank you
Try going, on the Admin Panel, to Settings -> Permalinks. On Default Settings radio group, select the "Post name" one. Save the changes.
Worked for me; hope for you too. :)
Source: this blog post.
EDIT: Website is not available, so I put its Wayback Machine URL.
I was having this same issue. I had forgotten to turn on the pretty perma links, but doing that didn't solve it for me.
I also had to update my apache virtual host file because the AllowOverride was defaulted to None.
<Directory /var/www/wordpress/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Once I updated this, and reloaded the Apache service, the API worked for me.
It was simply a matter of enabling URL rewriting in WordPress. Basically, go to Settings -> Permalinks and make sure the first rewriting option is set to Posts Name.
Apart from answer shared above: Settings -> Permalinks. On Default Settings radio group, select the "Post name" one. Save the changes.
I also had to manually update .htaccess file to reflect the changes I made (permalinks to "Post name", and the little Wordpress help text shown on the bottom of the page was really helpful:
If your .htaccess file was writable, we could do this automatically,
but it isn’t so these are the mod_rewrite rules you should have in
your .htaccess file. Click in the field and press CTRL + a to select
all.
Basically copy the new mod_rewrite rules as instructed by Wordpress above and manually update your .htaccess file! doing this worked for me!

404 error on drupal after migrating

I have a Drupal website in the internet.
I want to work on local from now, so I install Wamp, I copy-pasted the apache filesystem of the website and made a sql dump with phpmyadmin.
I re-create the same database on phpmyadmin with the same name & datas than on the web.
Now, I can access to the main page (the ). All is ok, i see a node, I see the whole menu with links, ...
When I try to navigate or log, it give me 404 error, what is wrong? URL sounds great, when I try ti access to anode with the nodeid, 404 again.
I suspect WAMP but I don't know how fix that problem!
Thanks a lot to help me!
Make sure mod_rewrite is enabled - it isn't enabled by default on WAMP.
You can find instructions on how to do so here.
Most likely you have AllowOverride set to None in Apache. I believe that is the default, and it will prevent your .htaccess files from working (These are the files that make your URLs work).
Edit your Apache config file, search for every instance of AllowOverride and change it to "All", E.g:
AllowOverride All
Also make sure you actually copied the .htaccess file down, sometimes it's hidden.
Make sure you have uploaded the .htaccess file to Drupal's root directory.
Or try to access your website with ?q=, like: http://site.com/?q=admin
Have you installed the local site in a sub folder? What's the local URL?
If the site is located in a subfolder, e.g. http://localhost/drupal, you'll need to add (or uncomment) a line in .htaccess that tells apache about the RewriteBase.
AllowOverride was set to None in my httpd.conf. Changing to AllowOverride All worked like a charm.
Remember to restart apache after the change.

WordPress localhost admin saving = "The requested URL was not found on this server."

I am running a local install of WordPress. Everything works except for the admin section. Whenever I try to save (for example, in the Settings page) I get this error:
Not Found
The requested URL /wp-admin/options-general.php was not found on this server.
I have set the permissions on options-general.php to 755 (also tried 775) and updated my httpd.conf file to change all instances of AllowOverride None to AllowOverride All but I still can't save anything in the admin section.
Another curious observation is that my Settings URL is:
http://localhost/wordpress/wp-admin/options-general.php
...but when I hit save it removes /wordpress and takes me to:
http://localhost/wp-admin/options-general.php?settings-updated=true
Additionally my WordPress Address (URL) and Site Address (URL) settings are both set to http://localhost/wordpress.
httpd.conf
If there's anything else I can try I would greatly appreciate it.
P.S. I went to the WordPress StackExchange site, but they said to post Apache errors here.

Resources