Where comes the Problem

It can happen that after you change the permalink of a page/post, instead of being redirected to the new page, you are redirected to a non-existing one, getting a "404 Not Found" error.

The reason why this issue appears could be that you don't have writing access/permission for the .htaccess file. Hence, even if you create the page with the new link http://yourSite/yourNewLink, the "yourNewLink" part does not exist on the server, just in WordPress.

Possible Solutions

  1. The first thing to do is to check if your .htaccess file is writable, which is under the root file of your apache web project. Change it similar to 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
  1. This above solve the most 80% cases but still not working with my case.
    Alternative Solution:
    Find the config file of apache:
sudo vim /etc/apache2/apache2.conf

then find the block of <Directory /var/www/html> and change the line AllowOverride None to AllowOverride All:

<Directory /home/sergey/siteName>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all

Then it solve the problem. If you still have questions, plz comment below.