Scriptfeeds Blog
  • Blog
  • WordPress
    • Woocommerce
    • WordPress Errors
    • WordPress Plugins
  • Development
    • WordPress Themes
  • Hire us
Cart / $0.00

No products in the cart.

No Result
View All Result
Scriptfeeds Blog
  • Blog
  • WordPress
    • Woocommerce
    • WordPress Errors
    • WordPress Plugins
  • Development
    • WordPress Themes
  • Hire us
Cart / $0.00

No products in the cart.

No Result
View All Result
Scriptfeeds Blog
No Result
View All Result
Home Wordpress

Quick Fix : Saving WordPress Post/Page gives 404 error

Scriptfeeds by Scriptfeeds
January 8, 2021
in Wordpress, Errors
0
84
SHARES
Share on FacebookShare on TwitterWhatsapp this Blog

Recently one of our client contact us for a Post and Page gives 404 error. Client explained his problem as ” When I try to update the page or post in WordPress, I get 404 error and website directs to front-end”. Well we are aware about some common reason for such errors but even after fixing it, error was still there. So before going to the our solution for our client. Please check below few fix which can help you to fix your 404 error on WordPress.

Table of Contents

  • Two Common fix
    • Our Fix for Page gives 404 error :
Page gives 404 error

Two Common fix for Saving Page gives 404 error :

1. Fix 1 : Flush the old Permalinks

  • Login into WordPress dashboard as Admin.
  • Click on settings on left menu and select Permalinks.
  • On Permalinks page, scroll down and click on save (don’t make any changes). This is flush the old link structure and create a new one.

2. Fix 2 : Editing .htaccess file

  • Login into your Cpanel or access your server as FTP.
  • On root folder (via file manager), right click on .htaccess and select edit. A new tab will open.
  • Delete old code in file and paste the below code.
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

NOTE : if .htaccess is not visible then you have to show hidden files in settings of cpanel.

Our Fix for Page gives 404 error :

Fix using White listing mod_security rule

Even after trying above two options, if Saving Page gives 404 error was still there. Above solutions are mostly on all blog and websites. We researched for some time to figure out Mod Security and decided to contact the hosting service of the website because website is blocking the access sometimes.

Client has NAMECHEAP Hosting services. We contacted NAMECHEAP support and informed the whole scenario. NAMECHEAP support is really quick and they fixed the problem in 5 minutes. So below is the problem which Returning 404 Error after saving WordPress Posts/Page.

The issue may be caused by Mod-security. Mod-security is an Apache module which works as a web application firewall. It blocks known exploits and provides protection from a range of attacks against web applications. However, sometimes, mod_security may incorrectly determine that a certain request is malicious, while it is actually legitimate. In such a situation, You can contact Hosting provider and they can whitelist the triggered mod_security rule on the server, so that you can bypass the block. It will fix the 404 error after saving WordPress Posts/Page.
So that’s how we fix the issue. So next time you got 404 error after saving WordPress Page/Post , try 3rd fix after trying the above two.

let us know if you have any questions in comment section or you can also contact our Support team.

Happy Coding 🙂

Connect with Developer
Loading
Tags: 404 error on Wordpress PagesSaving WordPress page gives 404 errorWordpress Post 404 error
Share34Tweet21Send

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

Scriptfeeds Blog

© 2022 Scriptfeeds

Blog Categories

  • WordPress
  • Development
  • Reviews
  • Marketing

Connect us on

No Result
View All Result
  • Blog
  • WordPress
    • Woocommerce
    • WordPress Errors
    • WordPress Plugins
  • Development
    • WordPress Themes
  • Hire us

© 2022 Scriptfeeds

This website uses cookies. By continuing to use this website you are giving consent to cookies being used. Visit our Privacy and Cookie Policy.