SOLVED: WordPress Page Not Found After Publishing or Updating Post (404 Error)

When working on your WordPress site, there are various errors you can get. One of the common ones is the 404 error. In a nutshell, a 404 error usually indicates that a page is missing.

If you are here, you probably want to know how to solve the WordPress 404 Page Not Found Error.

For starters, we’ll assume that the posts you are trying to access are published on your site. Simply log into your WordPress dashboard to confirm that the pages/posts you want to access are there.

Done? Good.

Now that the posts are there, here are some ways you can fix WordPress page not found error.

 Save the Permalinks

This is the easiest fix to the page not found error on WordPress. Here’s how to go about it:

i) Log into your WordPress backend

ii) Go to Settings–Permalinks

iii) Click on “Save” on the permalinks page.

That’s all.

Check whether the 404  error page has been fixed.  Use a different browser or clear your cache from the current browser to make sure the 404 error is not due to some cached pages.

If the error is still there, try the next solution.

Edit .Htaccess File

Sometimes, the .htacess file might get corrupted and lead to 404 errors on your WordPress page. Fixing this error is simply about rebuilding your .htacess file. Here are the steps to follow.

i) Log into your cPanel and go to the File Manager to access the .htacess file. (You can also use FTP to access the file)

ii) Rename the .htacess file by giving it a name such as .htaccess-bak

iii) Download the .htaccess-bak file to your computer and open it with Notepad or a similar program

iiv) Replace the contents of the .htacess with the default WordPress code below:

# 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]

# END WordPress

v) Save the file, rename it as .htaccess and upload it to your server.

Note: if you did not find the .htaccess file, make sure you have enabled your cPanel to show “hidden files” since .htacess is usually hidden by default.

Note 2: If the .htaccess is not there even after enabling showing of hidden files, then create it using notepad. Open a new file on Notepad, paste the code above and save the file as .htaccess (don’t forget the “dot” before htaccess. Also, leave the File Type saving area blank. The .htaccess should not be a .txt file)

If changing the .htacess file did not solve your problem, here is another option.

Disable ModSecurity

The third option is to disable ModSecurity on your cPanel account to fix the 404 WordPress page. Follow the steps below:

i) Log into your cPanel account

ii) Go to Security–ModSecurity

iii) Disable ModSecurity

This should fix the 404 error of the posts you are trying to update or publish.

If you are concerned that you are reducing security by disabling ModSecurity, then just turn it back on again after updating pages/posts.

Hope one of the solutions above has helped you. If so, let me know in the comments below.

You can also buy me a beer below:

SOLVED: WordPress Page Not Found After Publishing or Updating Post (404 Error) 1


  1. Mazhar March 20, 2019
    • I Cozens April 24, 2019

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get more tech stuff like this
in your inbox

Subscribe to our mailing list for occasional amazing tech stuff.

Thank you for subscribing.

Something went wrong.